Rather than due to trauma, you are likely to be having Balantits, an inflammation of the glans penis. This is not an uncommon condition, but is fortunately easy to treat in most cases.
The main causes are:
Inadequate Hygiene: poor hygiene can lead to overgrowth of bacteria or fungi. That is why it is seen more commonly in uncircumcised men.
Contact dermatitis: a new soap or detergent which is irritating may cause such inflammation. You should see if you have been using a new soap, etc. during this period and stop it if you find any source.
Tight foreskin: a tight foreskin may predispose to inadequate hygiene.
In your case, trauma to the glans by rubbing forcefully may have caused some infection.
Adequate hygiene - wash with a lot of clean water, avoid soap as it further irritates the skin.
Removing any irritant products like soaps.
Use antibiotic ointments: you can use Neosprin ointment available OTC.
Anti fungal ointments: you should also apply an antifungal ointment like Lotrimin (OTC).
You can apply Neosporin and Lotrimin together twice daily each.
However, if these steps are not sufficient to clear the inflammation within about 2 weeks, or it increases, or there is repeated infections, you should consult a doctor, preferably a dermatologist.
Many conditions can cause this:
Infections by pathogens like HPV and other STI, fungal infections, Mycobacterial infections, etc.
Rare skin conditions like Necrobiosis lipoidica, Balanitis xerotica, etc.
A dermatologist will be able to give you an exact diagnosis.
I hope I’ve provided the information you were seeking. If you are happy with my service, your 5-star rating at this time is most welcome. If you need more help, please let me know so l can continue to assist you.
Thank you and I wish you the best of health - stay safe!
Dr. P. Jyoti