You went to the doctor which is good. That's taking care of yourself. But you have to trust your doctor. They wouldn't tell you it was nothing to worry about if it wasn't. Penile melanosis is a possibility which is harmless! Usually doesn't require any treatment. Here's info on it https://www.medicalnewstoday.com/articles/327189 If you were a bit rough on your penis during masturbation, this can cause it. It should get better on its own.
Your urologist has answered your question, so I assume this question is based on some anxiety you have that you've injured yourself masturbating, which is quite possible. If you irritate that area, it's quite sensitive, and when it's irritated it does get red. As for the dark spots, again, the urologist has answered that question, and a penis does have different colored areas on it.