Vitamin D is important for utilization of calcium and phosphorous.
These are nutrients that are important for bone health. Outside of maintaining healthy bones, a few of the other thing it helps are the immune system, blood pressure regulation, muscle strengthen, and tooth decay prevention.
All these benefits can be gotten for free. Yes, I said free.
If you go outside around noon for 10-15 minutes daily without sunscreen your body will produce vitamin D.
If you don’t get vitamin D from sunlight the other options are through food and supplementation. It is tricky to get it from food. For example of the the good food sources is salmon but eating salmon too often can lead to mercury toxicity.
So unless you want to pay for supplements go outside and enjoy the sun.