Constipation? Gas?

I’m in a ton of pain in my lower back. Not a cramp pain but sharp like gas pain. Crazy bloated, stomach hurts to the touch or if I bend over. I tried going to the bathroom but couldn’t.