Help?? Cramps??

So I ended my period a week ago and during my period I had sex with my boyfriend well my period ended 3 days earlier after having sex. I just thought it was because of having sex well now I’m starting to cramp like my period is coming back on? What can cause this? I’m not suppose to get my period for another 2 weeks.