What can I take for constipation?

I’m 32 weeks and I’m so backed up I literally have crippling pain feels like contractions. I really need advice I’m dying