If you try to study diet using an observational design (like a cohort study), you'll always have issues with confounding because people who eat special diets (e.g., vegetarian, vegan, keto, etc.) are fundamentally different in so many other ways that it's difficult to control for all of these differences.
I'd you try to do a randomized controlled trial, compliance is difficult, because people can't control their appetites, and they like certain foods. You also can't mask people to the intervention status.
I'm skeptical of most diet study results for the above reasons.