Vitamins and micronutrients.
There used to be a common, horrific illness that sailors would get, which was mysteriously cured by limes. People know about this one, it's scurvy. But there are other horrible ways to be sick from vitamin deficiency that weren't considered curable at all, and people had no idea what caused them.
Rickets is a disease caused by vitamin D deficiency where your bones get bendy and grow in the wrong shape (it is most apparent in children). It causes permanent deformity and very easy fractures, along with debilitating pain and persistent dental issues. Historically, it was known that milk, and later, cod liver oil, would improve or prevent it, but the reason was not understood until the vitamin was discovered.
Wernicke-Korsakoff syndrome is a complication of alcoholism that leads to psychosis, dementia, and death if left untreated. Severe alcoholics used to just go completely mad before dying, basically. It ultimately results in permanent memory loss (retrograde amnesia), as well as the inability to form new memories (anterograde amnesia). It is caused by the fact that alcohol prevents the absorption of vitamin B1 (thiamine). It is treatable and preventable by giving the patient thiamine shots - if caught early, before permanent brain damage has occurred, it is fully reversible, although the underlying substance abuse issue still needs to be addressed to prevent recurrence.
Pernicious anemia is caused by vitamin B12 deficiency (in turn ultimately caused by an autoimmune issue causing poor absorption). It causes blood cells to be the wrong size and too few in number, resulting in dizziness and fatigue. It also causes neurological symptoms like tingling in the extremities, poor coordination, confusion, and, in late stages, dementia. There was no cure for pernicious anemia in the past. People would simply become anemic and die from it. That's why it's called "pernicious" - that's an old-fashioned way to say "insidious and deadly," named for its slow onset and then-incurable course. Now it is curable with vitamin tablets or periodic injections.
Cretinism, or, less stigmatizingly, congenital hypothyroidism due to iodine deficiency, is a developmental disorder caused by the inability of the thyroid gland to function properly without sufficient iodine. it causes short stature, intellectual disability, infertility, hair loss, and a large lump in the neck known as a goiter (i.e. a hypertrophic thyroid gland). It was historically associated with poor inland populations living far from the ocean (due to the protective effect of consuming seafood, which is naturally high in iodine). We now simply put iodine in table salt, and this disorder is virtually unheard of in regions where this is the case.
Neural tube defects are a leading cause of birth defects, infant mortality, and stillbirth. The most common nonlethal forms of neural tube defects include spina bifida, hydranencephaly, and encephalocele. These defects are caused by a failure of the embryonic structure that becomes the spinal canal to close properly during development, leading the central nervous system to have a distorted shape that may impair cerebrospinal fluid drainage and put pressure on the brain. In severe cases, e.g. anencephaly, the brain/spine essentially develop outside of the body, which is not compatible with life (anencephalic and iniencephalic babies typically die within hours or days; fetuses with more severe forms are usually stillborn if they are not terminated). The risk of these defects is drastically reduced by taking supplemental folic acid (vitamin B9).
Vitamin K is perhaps the most amazing one on this list. Newborns often have very low vitamin K levels due to the fact that it does not cross the placental barrier easily and is not found in high levels in breast milk. It is only produced by gut bacteria, which babies do not have when they are born, and it takes time for them to acquire the right flora from their environment. Deficiency impairs blood clotting, and in infants, can lead to brain bleeds and sudden, unexplained death. Tiny babies would simply die of brain hemorrhaging for no good reason at all. But if they're given a quick shot of vitamin K at birth, that doesn't happen.
We have cured or prevented so many diseases just with vitamins/minerals.