Most common cause is fissure with or without haemorrhoids, both of which are associated with constipation and hard stools.
U need to correct your constipation if present
Next Steps
Drink plenty of water, though high fibre diet is good but avoid as of now till u have perianal pain. Use lignocaine or nifecaine ointment perianal region 5-10 mins before passing motion followed by sitz bath. repeat it every time u pass motion.
can take stool softeners if constipation