There are some people who believe this, but Vitamin D and sun exposure have been a popular topic for a very long time now. It’s getting harder to find people who think that avoiding all sun exposure is a good idea.
The most confusing part appears to be the idea that wearing sunscreen is equivalent to avoiding UV exposure. Sunscreen reduces UV exposure, but does not completely eliminate it. This misconception has produced a lot of people who think “sunscreen bad” because “UV good”. You can get moderate UV exposure while wearing sunscreen.