Yea sun damage and cancer vs. vitamin d deficiency is a little bit of a balancing act. It also doesn't help skin color is very critical part in all of this but people view that topic as taboo to discuss. The entire reason for skin color variations is a genetic optimization for UV absorption at specific latitudes vs sunburn risks.
That and the other half of the problem is we are all sedentary as hell in all latitudes these days. Be it people hiding under AC at the tropics or hiding in heated homes in the north. We don't go outside to get enough sunlight and our fat reserves that store vitamin d don't grow large enough because we still don't go outside when the weather is tolerable.
I don't think anyone is making it taboo to say someone's melanin content affects how they absorb UV light. It's taboo when you tie it to all sorts of other things, say, how well they should do at school.
> The entire reason for skin color variations is a genetic optimization for UV absorption at specific latitudes vs sunburn risks.
This seems obvious but was not confirmed by genetic evidence. The rate of adaptation turns out to be much higher than can be explained by skin cancer.
The real cause appears to be fertility. UV radiation breaks down folate (vitamin B9) in the bloodstream, and folate is critical for DNA synthesis and repair. Folate deficiency causes serious problems in pregnancy, neural tube defects like spina bifida, and may impair sperm production. So darker skin in high-UV equatorial regions likely evolved partly to protect reproductive capacity.
In the other direction, lower melanin production helps with vitamin D synthesis in lower sunlight environments. Vitamin D requires UV-B radiation to be synthesized in the skin, and melanin inhibits this. Vitamin D is also linked to fertility. It's involved in sex hormone production and has been associated with successful implantation and pregnancy outcomes.
If you're curious, check out Nina Jablonski and George Chaplin's work. Their hypothesis is that skin color evolution as fundamentally about reproductive fitness: dark enough to protect folate, light enough to synthesize vitamin D. Both nutrients affect fertility, fetal development, and offspring survival. They have an immediate primary impact on fertility and success, while skin cancer even in the most extreme environment/phenotype mismatch, has an onset after reproductive age.