Erectile dysfunction (ED) means difficulty getting or keeping an erection firm enough for sex. In men under 40, performance anxiety, stress, depression, pornography-related expectations, and relationship difficulties are common contributors. Lifestyle factors matter too: smoking, heavy alcohol use, recreational drugs, poor sleep, and being very out of shape all reduce erectile function.
ED can also be an early marker of physical health problems, because erections depend on healthy blood vessels and nerves. Even in younger men it can point to conditions like diabetes, high blood pressure, high cholesterol, or low testosterone. For this reason it should not be brushed off as purely psychological.
See a doctor for a proper assessment, which may include checking blood pressure, blood sugar, cholesterol, and hormone levels. Many causes are treatable. Avoid buying erection pills from unregulated online sources, as these can be counterfeit and dangerous, especially if you take heart medication.