Can’t have sex while pregnant, it’s uncomfortable! 😥

I’m 27 weeks pregnant and the last time my husband and I tried to have sex, it was extremely uncomfortable to me. My belly contracted and hurt a little, we had to stop because I got scared, even though I was enjoying the sex at the same time, feeling sexual pleasure. Is that normal? When I was pregnant with our first daughter (this is our second) I had no problems with sex at all, we had sex until the end of the pregnancy. It was 9 years ago. Has anyone ever gone through this? Any experiences to share? Thank you! ☺️