Whenever we try having sex i get soooo nervous and i don't know why!
Hi, good questions. Sometimes our first time of sex can hurt but it's not usually too painful. Do you think your vagina was dry? No lubrication causes more friction and discomfort with sex. Not being lubricated (with natural vaginal "juices") can happen because we're nervous... and most people are nervous or unsure when it's their first time! Sometimes also if the guy is nervous or is a bit rushed, it's harder for the girl to get "wet" (lubricated). So it's a combination of factors.
It's hard when you've had the experience of it hurting because, of course, you get nervous that it will happen again. It sounds like you trust your guy and that he will give you time and take it slowly because he wants you to enjoy the sex and not be hurt by it. You could also buy some water-based lubricant for next time (in case you are dry). There are many types available from drug stores (chemists) and supermarkets.
Maybe explore yourself when you have some time and privacy because it will reassure you that as you get excited, your vagina will lubricate and that the vaginal entrance is quite stretchy. Use your fingers, or your boyfriend can use his, to open the vagina up slowly and gently. This can also be a good way to guide the penis in. The vagina is built to stretch (remember it lets babies through it) but the sides of the vagina sit flat together when we're not using it. Sometimes discomfort is just the angle of the penis not being quite right to slide in, or hitting against the walls of the vagina instead of sliding along it.
Sometimes sex is always tight and painful for women if they have vaginismus, but that is fairly rare.
Good luck with this. Take it slowly and get your confidence back. Being nervous is understandable but will get better as you have good experiences. Just make sure that as well as all the above, you have worked out how to protect yourself from sexually transmissible infections (STIs) and unwanted pregnancy, and that you're aware of the laws about sex for where you live (see link below).