Pain from sex after a long period of time

y

So the title says it all. I took a pregnancy test on March 31st and it was positive.

I was on progesterone suppositories and was soooo sick from it. Then at 8 weeks found out I had a sub chorionic hematoma after a major bleed and was on pelvic rest. I had my anatomy scan at 19+5. Then a week later at 21 weeks I lost my daughter.

After losing her I was told to wait 6 weeks. So when we finally had sex again I had cramps after.

Being that it had been 6 months (😩) does that make a difference? I had never got that long without sex before. Is it normal. I had sex again last night for the second time and I had cramps after , like period cramps, but they went away quicker this time.