Not able to stay hard when standing

I’m 31 so I have medium sexual experience. I’m able to get erection when I’m laying down but I’m not about to get a proper erection when I’m standing up. I have watched a good part of my life but I have stopped it completely now. But I find it hard to get hard when I’m standing but I can’t get hard when I’m laying down. What could be the reason. Im 5’9 about 72kg. Goes to gym 2-3 time a week. Haven’t been doing pelvic based exercises.