Worth noting that sunscreen only blocks a % of UVB, meaning you're still producing vitamin D while wearing sunscreen. Sometimes it's better for your skin to be wearing low SPF for regular sun exposure.
i.e. SPF 15, 30, & 50 sunscreen only blocks 93%, 97%, & 98% of UVB (respectively)