Welcome to HCM and hanks for your query.
It looks like you have infection of the foreskin and may be glans
has worsened the situation based on the description.
It is better to use antibacterial creams like soframycin/ bacitracin
and maintain hygiene.
If it does not improve, it is wise to consult a surgeon/ urologist
Get well soon,