With constipation and laxative use behind it, this burning is almost always a small anal fissure or early piles rather than any infection. Hard stool tears the sensitive anal lining, and then every motion re-irritates it, which is exactly the burning you describe. Two days is early, so it usually heals fast if the stool is kept soft. Bleeding, a painful lump, or fever would change the plan.
Next Steps
Stop the strong laxative, switch to a stool softener like isabgol at night with plenty of water, sitz bath in warm water twice a day, and a local anaesthetic-plus-healing ointment before and after passing stool. If it is not clearly better in 5-7 days or you see blood, book a consult with me on Practo and I will examine and prescribe properly.