Worth noting a good source of vitamin D is the Sun
In some places, at certain times of the year, the sun is not a good source. Also dermatologists don't suggest using the sun to get vitamin D due to skin damage. Everything in moderation of course. I imagine the sun has other benefits than just vitamin d.
Also getting sun through glass does not give vitamin D.
Right because glass filters most harmful spectrums of UV light which is what stimulates vitamin D production.
Gotta give yourself cancer and premature wrinkly skin if you want to boost your immune system. No pain no gain.