Plan protection and daylight use together
Do both: choose a suitable daytime outing and use sun protection according to the local UV forecast; at meals, consider fish, eggs and vitamin D-fortified foods. You need not try to get vitamin D by deciding to use less sunscreen before going out.
Spending time outside during the day
If a walk supports a regular routine, the purpose is daytime light and activity. Choose a route with shade and rest and prepare clothing and a hat. Look naturally at your surroundings, not directly at the sun. Daytime light and skin UV exposure differ; a walk does not require removing clothing or enlarging exposed areas.
Where vitamin D comes from
UVB is needed for vitamin D production in the skin, but more sun is not always better. Season, skin pigmentation, age, clothing and other factors matter. Check local UV and use sun protection as usual, and consider dietary sources of vitamin D. If worried about deficiency, describe your usual diet and activities to a doctor or nutrition professional.
Put both questions into today’s actions
For example, you usually work indoors and want a weekend walk. Check weather and UV, choose a time and prepare clothing, a hat and sunscreen. When shopping, choose suitable fish or check whether your usual drink is fortified with vitamin D. Outings and attention to diet can go together.
In heat or thunderstorms, change the outing time or stay indoors. Continue paying attention to dietary vitamin D; after the 30° prompt, recheck labels on foods you usually buy. Buying a food containing vitamin D does not tell you whether you are deficient.
Use sunscreen alongside other measures
Use sunscreen as directed on areas clothing does not cover, paying attention to amounts and reapplication, along with hats, sunglasses and shade. Laboratory measurements of how much UV a sunscreen blocks do not directly show whether everyday users will be deficient in vitamin D; check what a study actually measured.