I get and hard but can’t maintain and erection

I’m 18 I get hard as normal but struggle to stay hard the minute foreplay stops