Yes, psychological factors like stress and anxiety can contribute to erectile dysfunction. Stress and anxiety can affect your ability to get and maintain an erection by disrupting the normal functioning of the brain's signals to the penis, leading to difficulty in achieving or sustaining an erection.