Welcome to HealthcareMagic. First of all avoid masturbation
for some days. At a younger age people usually have more sex drive and their frequency of masturbation is maximum. You can indulge in this activity as long as it is pleasurable and you have the drive for it. it should not cause you any pain.
You can indulge in other activities like reading, cycling etc or some hobby so that you avoid masturbation. Hope it helps you. Regards.