The great majority of cancers, some 90-95% of cases, are due to environmental factors. The remaining 5-10% are due to inherited genetics. – Source
metmike: This is just one opinion above. Genetic tendencies in families which greatly increase the chance of cancers, if dialed in, means that genetics plays a greater role than suggested by that statement.
https://www.cancer.gov/about-cancer/causes-prevention/genetics