Spasm in right side of uterus

For the past two days the right side of my uterus has been spazzing. Every so often I get a twitch. It can be painful. This is my second day having it and when I walk it feels heavier. I’m supposed to be getting my period really soon. I am sexually active but I don’t use protection. I am on the pill though. Any ideas on what this is?