You must remove causal agent or change to more large underwear, your underwear must be from natural fabric preferable cotton, don’t try treat yourself in sash cases . Don’t delay and make appointment with Dermatologist
for right diagnosis and treatment. From your description I understand that start with irritation, contact dermatitis
accompanied with allergic reaction
which spreads to your legs, but concern is your infection( you stated appeared yellowish puss) that need immediately topical and general medication like antibiotics, antihistaminic, antiseptics and of course Dermatologist review.