There are more reasons for not getting an erection recently, and it needs to be treated for the cause. First, check the level of androgen through blood test and then make a clear diagnosis. If the level of sex hormone decreases, you can take oral testosterone undecanoate pills to supplement androgen, which can gradually restore the erectile function, or take oral medicines to supplement the kidney and aphrodisiac, such as Wu Zi Yan Zong Wan, Jian Yang capsule and other Chinese medicines. Usually eat more leeks, okra, oysters and mutton, all of which have aphrodisiac effects and can help the penis to get an erection. Not getting an erection may also be caused by factors such as excessive physical fatigue and mental conditions. You should properly adjust your mind, reduce work pressure, as well as relieve excessive anxiety and tension, while you should avoid staying up late, ensure good sleep, and properly enhance physical exercise to help your penis get an erection.