It seems that you are having fungal infection
on the part.
It has no relation with masturbation
Apply anti-fungal cream locally.
Take oral anti-fungal tablet like Flucanozole 150 mg once in a week for 4 weeks.
Keep local part well shaved, clean, dry and airy.
Ok and take care.