ED is often a symptom of an underlying condition. In some cases, stress and anxiety may increase your risk for ED but not cause it. Talk to your doctor if you have any other symptoms accompanying ED. They'll be able to help diagnose the cause and potentially treat it.