If its recent, avoid constipation by taking fibre diet like salad with meal, fruits with height fiber content, or laxatives liquid parafin based for 2 to 3 weeks, good hidration with adequate amount of daily water intake. before going to toilet use ointment which softens stools and give local anaesthesia to painful area, so stools pass easily with creating more trauma to area, if it still persists more than 6 weeks then intervention may be needed, and to be decided by you consulting surgeon.
Next Steps
high fiber diet, avoid fast food, drink water and do use ointment every time you go toilet atleast 20 minutes before
Health Tips
do visit surgeon