First time having “sex”.

So... my boyfriend and I attempted to have “sex” yesterday... and it was a total fail. Before anyone asks, yes, we are both inexperienced, and yes, we both took Sex Ed. Anyways, when we were about to have sex, we of course did it safely with protection... but there was a problem. It hurt like hell for me, and it wasn’t going in. Maybe it was a lack of foreplay, lack of lubrication, or just a lack of good positioning. We tried the missionary position, the position where I was on top, and doggy-style. Due to the pain I was in, I lost the self-lubrication I had, and my boyfriend then went flaccid because he wasn’t able to see me in pain. After he left to go back home, I cried... I felt like a failure because it wouldn’t go through, and him and I both struggled with finding my opening. I was clenched, knowing I may have should’ve been relax and comfortable, which being clenched may have made me tighter... maybe I need advice, but I just needed to vent. My boyfriend and I tried to have sex, but we both knew it was right because we had no protection at all. I posted about it, and was judged by other women, so I deleted the post... so that’s it... that was my venting episode.