TMI! Constipation diarrhea gas severe cramps questions

Okay so to start this off I will be 6 months pp may 20th. I am 6 weeks pregnant. So this morning very early like 12:30 I won’t up feeling pain in my lower back on both sides of my hips and in my uterus area. I thought it was my period! It was so painful! Then it made me feel like I just had severe gas bc the longer it hurt the more it was feeling like something els. So you know of course I’m sitting there at like 1 in the morning wishing I could just go bc I feel like I’d feel a lot better. Any way turns out I guess I was constipated but after I got unconstipated I had severe diarrhea! Finally though after 30-45 minutes though my pain went away! But now went I push down on my stomach it’s sore. Doesn’t matter what part I touch it’s my whole stomach! I’m just wondering if the cramps could of hurt the baby bc they was really bad! Like I kept telling myself if this mess don’t go away I’m gunna have to go to the ER bc they was so horrible. Could really any of that hurt the baby? Diarrhea constipation severe cramps. Orcutt that even mean anything like miscarriage