That's a bit of an exaggeration, Vitamin D does not require hours in the sun:
> Recommendations to Obtain Adequate Amount of Vitamin D.
> Sun exposure to the face, arms, hands, and legs without sunscreen for 5 to 30 minutes at least twice a week or more between the hours of 10 am and 4 pm
Source: https://pmc.ncbi.nlm.nih.gov/articles/PMC8299926/
Now that's for most people: if you live in Alaska then during the winter maybe you need a litle more or something ... but the point is most people just need a little sun, < 30 minutes twice a week.
For several months of the year, vitamin D synthesis is near zero in latitudes as low as like 40° or 45°. Boston is 42°.
In Calgary, it's almost half the year that you basically cannot rely on the sun at all for vitamin D.
I'll say track and test yourself, since it depends highly on skin tone and weather.
That study also claims 12-20ng/mL 25-hydroxyvitamin D is sufficient. My doctor says the post-COVID studies suggest 75ng/mL is closer to optimal, and <30ng/mL had been considered deficient for about a decade before COVID.
Personally I had no problem hitting 20ng/mL through sunlight alone and I'm pretty fair skinned but live somewhere sunny. But I haven't been able to get anywhere near 75ng/mL even when I've made an effort to increase vitamin D through supplements and exposure to the sun.