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