Miscarriage

Ok so I had a miscarriage at like 4-5 weeks, my bleeding was the length of my regular period just more blood clots, I had sex the day my bleeding stopped and the next day which was a week ago (and yes he did). But now I’m getting cramping and not bleeding, anyone experienced this? And why