Hello sir,
Erection problems may occur due to many reasons like reduced sex hormone levels , poor vascular quality or even anxiety etc..
No need to panic there are proper tests and treatment for the same.
Next Steps
consult a sexologist and get the investigations done and go ahead with a proper management plan
Health Tips
do not panic, sleep well and follow regular exercises. also avoid alcohol and smoking