Looking at the photo (multiple small dark/brownish pinpoint spots scattered over the shaft skin, no swelling, no discharge, foreskin looks normal) and going by what you've described (no itching, no pain, nothing else) - I can't give you a certain diagnosis just from a picture, but here's what this pattern most likely represents, and what it's less likely to be:
Most likely explanations (benign, common, not a disease)
- Friction-related pigmentation / micro-trauma marks - Repeated rubbing of the shaft skin (whether from regular masturbation, vigorous/forceful handling, or friction from clothing) can cause tiny areas of post-inflammatory hyperpigmentation or small healed petechiae (burst capillaries) that show up as dark dots. These are harmless, don't need treatment, and fade on their own once the friction stops.
- Angiokeratoma of Fordyce - Small dark red/purple-black papules caused by dilated, thin-walled veins just under the skin. Very common on the scrotum and sometimes the shaft, more often seen as men get into their 30s-50s. They're asymptomatic (no itch, no pain) and only bleed a little if scratched or nicked - otherwise they're completely benign and don't need treatment, just reassurance (Andrews' Diseases of the Skin, p. 159).
- Ordinary pigmented spots/moles (lentigines) - Some people just have small benign pigmented macules on genital skin that have nothing to do with sexual activity at all.
Less likely, but worth ruling out with an in-person exam
- Genital warts (HPV) - usually raised, flesh-colored, verrucous/cauliflower-like, not flat dark dots
- Fungal infection or folliculitis - almost always comes with itching or redness, which you don't have
- Molluscum contagiosum - typically pearly, dome-shaped bumps with a central dimple, not dark flat spots
On your specific question
There's no medical evidence that masturbation itself (regular or vigorous) causes a "disease" - but forceful or excessive friction can absolutely cause this kind of superficial skin change (small bruised/pigmented spots) without any pain or itching, because it's just skin/vessel trauma healing, not an infection. If that's the likely cause, easing off the friction/pressure and using a lubricant during masturbation usually lets these fade over a few weeks.
What I'd suggest
Since a photo can't fully substitute for a physical exam (texture, whether spots blanch when pressed, and whether they're flat or raised all matter for the diagnosis), if the spots don't fade in 3-4 weeks, change in size/color, start bleeding, or you develop any new symptoms, it's worth a quick in-person look by a dermatologist or urologist. Otherwise, this pattern (asymptomatic, no itch, no pain) points toward a benign, self-resolving friction-related change rather than any sexually transmitted infection or serious disease.