No, it has nothing to do with masturbation.
Looks like it might just be some darkened skin. If you aren’t sure, then get checked but i don’t think there’s anything to worry about