Yes, these are true, doing the right thing, eating well and taking caring of yourself is not a magical bullet.
However it's irrefutable that exercising, sleeping and nutrition improves your health.
Will it prevent you from ever getting cancer? no, but it sure helps.
My mother passed away from cancer, she always exercised and took care of herself, it made the quality of her life much better. Looking back, she would have suffered much more had she not done that.