Beta-blockers may contribute to ED because of a decrease in nitric oxide (except for nebivolol). However, it's not clear whether these medications affect testosterone levels more specifically.
While you may gradually experience decreasing testosterone levels with age, uncommonly low levels may contribute to a reduced sex drive, ED, fatigue, and other symptoms.
If you think you have low testosterone, you should talk to your doctor about what you can do to help.