Hello,
It can be due to allergic reaction, scabies or heat rash( less likely). If it is painful then herpes is an important possibility. Scabies is a contagious skin infection caused by a parasite – the mite, which burrows under the host’s skin and causes intense allergic itching. It is transmitted from objects or beddings, but more with direct skin- to – skin contact.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.
I would definitely go to the doctor cause you might have a slight rash especially if it is hurting. Try not to scratch and until you can get to the doctor use some cortizone cream to help the itching.