Cancers and Tumors mostly happen as a result of some errant mutation - there are limitless causes for such things and the best diet in the world can't save you from random biological chance or solar radiation. Everything comes with a risk and 98 times out of 100 your own defences will see this mutation happen and shut it down before it gets too far
A 100% effective 'prevention' for cancer would basically be a souped-up immune system to the point that we basically never get meaningfully sick, and probably live another 30-50 years as a result (most cases of "died of old age" are more like "had 7 different minor cancers which overwhelmed the body's systems")