I would definitely recommend that you see your primary care doctor
about this issue. Erectile dysfunction
is a very common problem in men of all ages, and it is worth having a checkup to help you figure out what might be going on.
First of all, the fact that you have no trouble with achieving an erection while watching pornography and also that you have normal morning erections is very reassuring, because this means that is unlikely that you have a underlying medical problem that is actually preventing erection. This means that your trouble achieving and maintaining an erection is more likely related to one of several psychosocial or lifestyle factors, such as stress or fatigue.
Your doctor will be able to help you review the stressors in your life to help you figure out if there is one single factor that could be changed. They will also likely suggest that you stop smoking, as this can affect sexual function. Finally, alcohol also is known to have strong effects on the ability to achieve an erection, and avoiding alcohol when you are planning sexual activity will probably be important.
Please make an appointment with your doctor when you can!