There is no definitive answer to this question as the research is inconclusive. Some studies suggest that there is a link between sunscreen and cancer, while other studies are not able to confirm this.
It is believed that sunscreen may act as a 'barrier' to the skin, preventing it from absorbing harmful UV rays. However, it is also possible that sunscreen may actually increase the risk of cancer by blocking the body's natural ability to produce vitamin D.
There is still much research to be done in this area, and until we have more definitive answers, it is important to use sunscreen as directed by your doctor or dermatologist.