Likely that you’re suffering from Fissure in Ano.
You’ll need to get a per rectal examination done to rule out any other diagnosis.
Next Steps
Consult a general surgeon in person
Health Tips
Maintain good perianal hygiene. Make sure you aren’t constipated - have a diet rich in fibre(fruits and vegetables) and drink atleast 3-4 L of water per day.