Hi,
Let me try to help you,
first of all let me ask a question, can you have erection while attempting self stimulation/masturbation?
do you get erection when you sometime wake up in the morning?
IF answer to above question Is "YES" then following may be of the cause!
Erection problems has many causes
1)
anxiety of performance (sexual performance)
2) Psylogical issues to control the ejaculation
3) low
testosterone (male sex hormone need for sex drive and performance)
4) initial adjustment for sexual relation
5) systemic disease (not for your age)
here is what can be done.
1) First see an physician in your locality to make sure the testosterone hormone level is with in required range, if low an replacement gel can be prescribed making you normal.
2) For the problem having erection issues only during sexual performance an desensitization is required and you can try some foreplay / ask partner to help you first with stimulation of your organs and then slowly start attempting the actual intercourse, give atleast 7-10 trials for simple stimulation by your partner and then once able to maintain the erection for long enough time after few tries then do the attempt for physical act of love.
3) If feeling to much nervous about performance
nerve calming medications can be prescribed by the physician.
ADVICE
PLEASE, contact physician and try to solve the issue, the over the counter medicines will not help as most of them are merely an advertisement stunt, and I don't know the shopkeep is educated in medicine but mostly its better to take
medical advice from doctors.
If feeling shy you can print the above answer and ask your doctor to help you, OR try the slow physical stimulation technique first if that works we fine , but if not then
consult doctor.