There is a version of this subject that treats the erection as the entire problem: it stopped working, here is how to restart it, good luck. That version is popular because it is what people want, and it discards the single most valuable piece of information the symptom carries.
Erectile function depends on small arteries doing something demanding — dilating on cue and delivering a large, fast increase in blood flow. Those arteries are narrower than the coronary arteries. When endothelial function starts to degrade systemically, the smaller vessels show it first. That is why urology guidance treats erectile difficulty as a marker for cardiovascular disease rather than a standalone complaint, and why the 2024 Princeton consensus guidance describes it as a risk-enhancing factor in cardiovascular risk assessment, with coronary calcium scoring worth considering for men who would otherwise sit at low to intermediate risk.
Put plainly: for a substantial number of men, this symptom arrives before the chest pain does, and it is the reason a problem gets found early. Treating only the symptom and moving on is the one response that wastes it.
What an actual assessment is looking for
A clinician working through this properly is not primarily deciding whether to prescribe. They are sorting the symptom into categories, because the categories have different consequences.
Vascular. The one above. Shares its risk factors with heart disease — blood pressure, lipids, glucose, smoking, weight, inactivity — which is why the assessment usually involves blood tests and a blood pressure reading rather than a conversation about sex.
Metabolic and endocrine. Diabetes is strongly associated, and undiagnosed diabetes sometimes presents this way. Testosterone gets checked, though it explains fewer cases than the supplement market implies.
Neurological. Nerve signalling can be affected by diabetes, spinal injury, multiple sclerosis, and pelvic or prostate surgery.
Pharmacological. A long list of common prescriptions can contribute, including several blood pressure drugs, some antidepressants, and drugs used in prostate conditions. This matters because it is often fixable by a conversation about alternatives — and because stopping a prescribed medication on your own to test the theory is a bad idea in a way that is worth stating explicitly.
Psychological and relational. Performance anxiety generates a self-sustaining loop: one failure raises the stakes for the next attempt, which is precisely the state in which it will not work. Depression, acute stress, and relationship difficulty all bear on it, and so do some of the treatments for depression.
Most real cases are a mixture. The clinical shorthand for sorting them is imperfect but useful — difficulty that is sudden, situational, and coexists with normal spontaneous or morning erections points more toward the psychological end; difficulty that came on gradually, occurs in all situations, and coincides with other vascular risk factors points more toward the physical end. That is a starting hypothesis, not a diagnosis, and it is wrong often enough that it is not a substitute for being examined.
The route you take determines whether the signal gets read
This is the part that has changed most in the last decade, and it is not really a medical question.
The drugs involved — the PDE5 inhibitor class — are old, well characterised, and out of patent. Access has loosened accordingly. In the UK, the MHRA reclassified 50mg sildenafil in 2018 so it can be sold in a pharmacy without a prescription, after a pharmacist consultation and with defined exclusions: significant cardiovascular disease, liver or kidney failure, and interacting medicines, most importantly nitrates, where the combination is genuinely dangerous. Elsewhere, a large online prescribing industry has grown around the same molecules.
That access is a real improvement for people who would never have raised it face to face. But notice what the fast route does and does not include. It includes a screening questionnaire and a supply. It does not usually include blood pressure, lipids, HbA1c, testosterone, a medication review, or anyone joining the dots between this symptom and cardiovascular risk. Someone whose erectile difficulty is the first outward sign of vascular disease can obtain a working treatment for the symptom and never learn the thing the symptom was telling them.
Which is not an argument against using it. It is an argument for treating the questionnaire as a supply mechanism rather than an assessment, and getting the assessment separately.
Two safety points that are not negotiable regardless of route: nitrates plus PDE5 inhibitors can cause a catastrophic drop in blood pressure, and an erection lasting several hours is a medical emergency because the tissue is being damaged while it continues. Also worth knowing that unregulated "herbal" sexual supplements have repeatedly been found on analysis to contain undeclared prescription PDE5 drugs, which removes both the dose control and the contraindication screening that made the regulated version safe.
The porn question, answered honestly
Given where you are reading this, it would be evasive to skip it.
The claim that heavy pornography use causes erectile dysfunction is not established. It is contested. Reviews of the literature find limited and inconsistent support for a causal link, and consistently note that the studies available are mostly cross-sectional, self-reported, and unable to separate cause from effect — people with sexual difficulties may well use more porn because of them. There is also a strand of research finding that the self-diagnosis itself carries a cost: among people who adopt an "addiction" framing through recovery communities, that framing appears to sustain distress rather than relieve it.
What can be said without overreaching is narrower and more practical. Arousal is partly conditioned by context, and if arousal has been reliably paired with one specific set of conditions — a screen, a particular kind of stimulus, a particular pace, solitude — then a different context can be a poor match. That is a real phenomenon, it is not a disease, and it responds to changing the conditions rather than to abstinence campaigns.
But it is also a diagnosis of exclusion, and it is being reached for first by people who would rather have a behavioural explanation than a vascular one. Being under forty does not exclude the vascular explanation. If the difficulty is persistent, the ordinary workup still comes first.
What to do with all this
Persistent difficulty over a few weeks is worth a doctor's appointment, and the reason is not the erection. It is blood pressure, glucose, lipids and the medication list — a set of things that are cheap to check and consequential to miss. The symptom is treatable, usually straightforwardly. The question is whether anyone reads what it was pointing at.
Everything above is general information about a common condition, not advice about anyone's situation, and it does not replace a clinician who can actually examine you.