I was doing a lil reading the other night and found this, its not saying one causes the other, only that people with thyroid disorders sometimes have ED.
Thyroid hormones and male sexual function. - PubMed - NCBI
People with thyroid disorders can have low Vit D, low DHEA, out of whack lipid levels and can even mimmic hypogonadism symptoms.
Donate blood regularly. My ED has gotten a lot better since I started donating blood. You want to do the whole blood donation not the plasma, but if you cant do the whole blood do the plasma.