The proper way to get tan and vitamin D is do it gradually, let the body build pigment. No stinkin sunscreens, just take your shirt off when working outside.
I agree with you about gradually building a tan, except for some skin types. But even they need a healthy dose of fresh air outdoors on uncovered skin.
So many of my peers who have problems with crumbling bones and needing hip and knee replacements. I can't help but wonder if it's because they've been staying out of the sun, for decades.