Erectile dysfunction in younger men, unless they're diabetic or have suffered some unusually cruel injury, is generally caused by stress, rather than any physical condition. High levels of cortisol or adrenaline (both byproducts of stress) in the body stymie the supply of oxygen to the organs, thereby decreasing blood flow to the penis. And the penis without blood has as much chance of getting up as a balloon without air. Which is why I found it easier to have sex with people I wasn't emotionally invested in: Once the fear of rejection is removed, sex is no big deal.
Knowing about your history of ED will help your health provider learn if your problems are because of your desire for sex, erection function, ejaculation, or orgasm (climax). Some of these questions may seem private or even embarrassing. However, be assured that your doctor is a professional and your honest answers will help find the cause and best treatment for you.