Erectile dysfunction can be due to many factors like
diabetes, high blood pressure, cholesterol, less physical activity or mental stress
Next Steps
regular exercise should help you a lot. even if persistent then consult a "dermatologist and venereologist "