Multiple things can be true at the same time:
1. Skin cancer can be successfully treated if found and removed early
2. Vitamin D is healthy and necessary, but at the same time too much sun exposure is harmful. That harm depends on different factors (like skin tone)
3. Some kinds of sunscreen might be problematic or bad for the environment, but there are different kinds of sunscreen (mineral-based, reef-safe)
4. There are multiple ways to mitigate sun exposure, not just sunscreen (avoid peak UV times, wear sun-protective clothing). Mitigation doesn't mean "complete avoidance"
5. Sun exposure is not the only cause of skin cancer, but it is a cause of skin cancer and a common one at that