Hi there....viagara is not the solution. It should not be taken until you are investigated. Erectile dysfunction could be due to many reasons. Anxiety being the most. So first try relaxation techniques and distraction method. Then try to cut down on any habits like alcohol, smoking or drugs. This will help in gain stamina. If there's no improvement then you must be investigated for any comorbidities like
diabetes hypertension hypercholestrolemia etc. Treating these comorbidities also can help improve stamina.
Medically there are many options like oral medications and topical creams. If the above conservative measure do not help kindly consult a psychiatrist for medical therapy.