Constipation pain?

This is total tmi but basically when I get super stressed I get constipated briefly and so I increase my water intake and fiber and then usually drink a black coffee and I’ll pass a stool... but the last two days I’ve been like basically constipated and nothing will pass and I kinda strained the last time I tried pooping and since then the right side of my back hurts so bad it’s like a dull ache and idk if it’s cause I’m constipated and strained or if I should be worried