a moderate amount of UV stimulates vitamin D production, suppresses inflammation, and turns on DNA repair pathways
But even for skin aging things aren't that simple, though sunscreen companies would love you to think that. UV light is a treatment for psoriasis, eczema, and many other skin conditions.
And vitamin D improves symptoms/reduces incidence of "hypertension, cardiovascular disease, stroke, breast cancer, colorectal cancer, metabolic syndrome, type 2 diabetes, obesity, multiple sclerosis, type 1 diabetes, rheumatoid arthritis, Alzheimer’s disease, autism, schizophrenia, asthma, preterm birth, maternal mortality, myopia and COVID-19" (a lot of these are aging related).
Most studies on UV light/vitamin D supplementation have been done in mice, which are nocturnal and don't get the same benefits as us from sunlight. Here's a recent article in pigs:
UV light exposure versus vitamin D supplementation: A comparison of health benefits and vitamin D metabolism in a pig model
https://www.sciencedirect.com/science/article/pii/S095528632...
Here's a helpful review of the topic:
Are Vitamin D Supplements an Adequate Substitute for Sun Exposure?
https://esmed.org/MRA/mra/article/view/3635
In this paper we review the current state of the science on this subject and conclude that vitamin D supplements are not an adequate substitute for sun exposure for attenuation of most of these diseases and adverse health effects, particularly hypertension and cardiovascular disease, and should not be recommended in lieu of sun exposure to patients presenting with low levels of serum 25(OH)D. Vitamin D supplementation for such patients could even be harmful, because it will raise patients’ serum 25(OH)D levels, thereby giving patients a false sense of security and obscuring the best available metric for insufficient sun exposure.