Why did it hurt ?!

So the last time I had sex was on Sat with my bf now for some reason at some point I couldn't let it in anymore cause it was hurting me. Could it be that it happen bc the I didn't have sex for the past 7 months until Sat? Cause 7 months ago I didn't feel any pain at all with my ex.