is a fungal rash
and should be treated with an anti fungal.
There are many over-the-counter formulation which are all effective.
The key to treatment is to continue applying the cream few days after the rash is gone, to prevent recurrence.
Also, keep your groin clean and dry as much as you can.