Painful sex

Madison

My SO and I were having sex, and as soon as he went in, it hurt so bad, I was feeling pain like in my ovaries ( not really ovaries but around that area on both my left and right side) no matter what position it still hurt so bad. After I went to the bathroom, I immediately starting cramping, on those both sides and around my back. What would cause this? I don’t think this has ever happened before. Cramps are bearable but it hurts. Could this have something to do with my IUD?