Is it me?

I am 20 years old and my boyfriend of 5 months and I finally decided to have sex. Last week we were about to do it and he couldn't get hard. I didn't take it too personally I know it happens sometimes. Last night we tried again and he got hard for a little while but then wasn't anymore. This time I'm taking it very personally. I asked him what was wrong, if it was me, but he said no and didn't want to talk about it anymore. I don't know what to do at this point, I don't want to keep trying and it ended up like this. Has this ever happened to anyone before or do you have any advice? It's been 10 months and I really just want to do it😂☹️