Vitamin D is made from sub cutaneous 7-Dehydrocholesterol a cholesterol metabolite from the cholesterol humans make naturally internally. Humans (all skin pigmented types) exposed to sunlight biochemically convert this cholesterol metabolite into Vitamin D3 (cholecalciferol).
https://en.wikipedia.org/wiki/7-Dehydrocholesterol
The symptoms of severe prolonged sunlight (sunburn) have excessive Vitamin D production (overdose) in the description— severe headaches from the excess D (which is a fat soluble Vitamin and takes a long time to be cleared from the body— through the liver and gall bladder).
Can Vit. D deficiency be caused by wearing sunscreen while outdoors? A generation ago, prior to widespread sunscreen use, one didn’t hear about Vit D deficiency.