Cramps after sex

So my boyfriend and I were have sex the other night and he was going deeper then usual since we tried a new position and I started to get a pain in my side abdomin and it really hurt so we had to stop. We have sex again a few nights later missionary everything is good nothing hurts. Then I get on top and everything is good but after I’m done on top and we finish I have these intense cramps it hurt so bad and I have never experience it before. Wondering if there is something wrong. Please help!