Eat a balanced and varied diet with lots of vegetables/grains/fruits and make sure you get the recommended daily amount of fiber.
Yes, health and medicine is actually more complex than "don't eat McDonalds!"
This advice is good. The broader idea that eating "healthy" solves everything is delusional.