Intermittent Fasting & Low Refined Carb, High Fat, Moderate Protein. Intermittent Fasting is the most important factor for health imo, but it is not the only factor for health.
Quality of diet is another important factor. Refined carbs cause weight gain and metabolic syndrome because insulin becomes too high. Healthy fats like omega 3 and saturated as well as high fiber carbs fulfills satiety and counters high glycemic foods.
Calories is the third important factor, but I find that if I do intermittent fasting and eat real healthy foods, I naturally learn to not overdo it.