It is hard to be certain from the decription what you have, but one common cause of recurrent painful bumps on the armpit and groin is hidradenitis suppurativa.
This condition tends to occur over flexural areas like the groin, armpit, below the breast and on the buttocks. The bumps are red, painful, and recurrent, and can lead to scarring.
This is often treated with topical antibiotics like Clindamyin lotion and oral antibiotics like Doxycyline. There are many other treatment options if antibiotics fail.
I think if you do have new painful lesions appearing again, do see a dermatologist to confirm the diagnosis and advice you on managing the condition.