Welcome back to icliniq.com.
Loss of sexual drive or libido itself can cause erectile dysfunction. The cause of erectile dysfunction could be psychological or physical, but the cause of loss of libido is almost always psychological. Besides psychological problems like depression, anxiety can cause both loss of libido as well as erectile dysfunction. The best way to distinguish between psychological or physical cause of erectile dysfunction is that if you have an erection any time during waking up or while masturbation then it is psychological.
Because if there is something wrong physically, you will never have an erection. Do let me know whether you are feeling sad or have lost interest in activities which you previously enjoyed? Change in sleep, appetite, weight, feeling guilty or pessimistic, excessive and uncontrollable worry are symptoms of depression.
We could start you on a libido enhancing antidepressant like Bupropion and wait for the response. Also, do get your vitamin B12, folic acid levels and your thyroid levels checked. After checking, start on a vitamin B12 or Folic acid supplement like capsule Renerve (Mecobalamin) or capsule Neurobion forte. You have not mentioned your lipid profile results. Lipid levels could be abnormal even if cholesterol is within normal levels.
Revert back with the test results to a sexologist online --> https://www.icliniq.com/ask-a-doctor-online/sexologist