From history it seems that you might be having some infection on glans penis
due to collection of smegma
Clean the smegma by averting fore skin and gently remove the smegma.
Apply antibiotic cream locally.
Keep local hygiene clean.
Make a habit of cleaning smegma while taking bath.
Ok and take care.