Basically it works like this: for women, sexual intercourse is usually a time that needs some preparation and time, a proper place, without hurry, without worry, without stress, must be totally dedicated to the sexual act. Your head should be free of concepts and prejudices related to body and sex. You need to be totally relaxed and delivered. Only in this way will your vagina be prepared to receive the penis (well lubricated and relaxed) otherwise it will hurt.
You need to discover your body and what parts you feel the most pleasure and need to teach your boyfriend what is best or what is not good for you and will only achieve this if you know yourself better.
Consult a gynecologist that you have confidence and feel free to talk about it. You need to be examined to see if there is any type of malformation in the anatomy of your vagina that may be causing these symptoms. Emotional disorders such as depression and anxiety can also lead to this type of situation.