Getting hard easy on my own

I get hard quite easily when I see someone hot. When we get closer, I get hard immediately but when we actually start the foreplay or barely trying to have sex I lose my erection. I noticed a pattern with the last couple of people I had sex with, the interesting thing I found is that I had erection problems with the hottest ones where my brain probably works in a way that I need to impress them, while the ones that I think are less hot than me, look me in the eye and want to suck my d*ck, I get hard really easy and go all the way in