On a closer look, what you are having are lesions of superficial folliculitis.
These lesions are quite common over the hairy areas of the body and develop due to pulling of the hair follicle which can occur due to tight clothing or itching or scratching of the area.
You need to apply a topical antibiotic
cream over the affected areas twice a day.
Since you have the infection at present, so avoid shaving the area till the time the infection heals completely which is for atleast 10 to 14 days.
Wear cotton undergarments so as to reduce sweating and friction.
Do not apply any other creams or oils over the region.
Also please tell if you have similar lesions over the scrotum
or penile region as they need to be treated as well.
Dr Geetika Paul