Eating a well-balanced diet rich in fruits, vegetables, whole grains, and lean proteins can help prevent cancer.