What causes cramps after sex??

I had sex earlier today and am cramping out of nowhere! I just ended my period like 4 days ago and lm on birth control