Hello
I share your concern
Looking at your description it seems to be caused by infection, Local allergy or an injury during sex or masterbation
Infection may reappear or reactivated in a case if it doesn't clear completely
I would like more information.to help you better like
Any history of exposure to unprotected sex?
Relevant medical history like diabetes or other metabolic disorder ?
In my opinion you should
consult a dermatologist for physical examination and series of investigations to establish a diagnosis like blood for
hemoglobin, CBC, VDRL or testing for herpes ( immunological tests ) urine culture and an
ultrasound abdomen.
You may require a course of antibiotics under supervision of your doctor
Meanwhile wash it with antiseptic soap or solution and keep it moist by applying antibacterial ointment like
mupirocin or
soframycin.
Maintain good hygiene
Avoid sex or use condom until it heals completely
Thanks for your question
please feel free to ask for more clarification I will happily answer you.
Wish you good health