Is it supposed to do that?

So, I’m a virgin, and I tried to have sex (with my now ex boyfriend) and both times it just hurt so much and we had to stop, I felt really embarrassed and a bit ashamed. Is there anything I can do to make it less painful the next time I try? Or any other advice? Much appreciated!!🙏🏼🌻