Vitamin D isn't really a vitamin
Vitamins are vital to your health and cannot be made in house. An internet search gives this definition:
Vitamin: any of a group of organic compounds which are essential for normal growth and nutrition and are required in small quantities in the diet because they cannot be synthesized by the body.
Technically, vitamin D isn't a vitamin because we can synthesize it ourselves from sunlight, though there are some other factors in ability to adequately synthesize enough vitamin D. It also (probably separately) has hormonal functions and in its active form is a steroid hormone.
From an Internet search:
Vitamin D is classified as a hormone, specifically a steroid hormone, when it is in its active form known as calcitriol.Vitamin D is unique among vitamins because it functions as a hormone in the body. When the skin is exposed to sunlight, it synthesizes vitamin D from cholesterol, which is then converted into its active form, calcitriol (1,25-dihydroxyvitamin D), primarily in the kidneys. This active form interacts with vitamin D receptors in various cells, influencing gene expression and regulating numerous physiological processes.
I have a salt wasting condition and it causes the body to misprocess fats. Vitamins A, D, E and K are all fat soluble vitamins and people with my condition are typically deficient in all of them.
Prior to getting a proper diagnosis, I used to joke "I have three shades: Pale white, off white and lobster red." My maiden name is Irish in origin and I inherited my father's pale complexion and didn't tan.
At some point, possibly in part due to getting my cholesterol levels up, I became capable of tanning. This was immediately followed by profuse vomiting when exposed to sunlight because I was producing vitamin D, which has immune functions.
I was homeless at the time in San Diego, California which gets June Gloom and I was bitching "Someone tell San Diego it's SUMMER." So I bought a dirt cheap hoodie to cover up my skin and that put a stop to the vomiting. Over time, my long-standing deficiency was gradually resolved and I no longer vomit in reaction to "excess" sunlight and my arms are much browner than the rest of me and much browner than I ever expected any of me to ever be.
So, no, food is not the only natural medicine available to you. Controlling inputs like how much sunlight exposure you get can ramp up or down factors impacting your health, including hormones.