After sex cramps and why?

So almost every time i have sex with my boyfriend, i usually get cramps the next day or few days later. the cramps feel almost as if i’m on my period. they end up going away after a few short days but still, i’m curious as to why this happens and what can i do to try to stop it from happening haha