So, in fact, the sunscreen industry is entirely incentivized to push the “the answer is always at the center of the extremes” mantra that is being repeated in this comment thread. Because that’s maximizing the use of their product because people will still go out to get the benefits of the sun but need to apply sunscreen to avoid the negative effects.
Agenda against sun exposing and relativization of vitamin D deficits is strong indeed.
Treatment prior to melanoma reaching the capillaries is also relatively cheap and easy (excision with margins), and extremely successful (>99% remission).
Median time between "that mole is looking a little weird" and the melanoma infringing on the capillaries is roughly 4 months.
So enjoy the sun and check your skin every month.
It's not magic. You're still in the sun. You're not inside.