Track everything
This is the gold rule that I followed rigorously to lose weight. To track everything using MyFitnessPal. Tracking automatically made me aware of what I was eating, and made me make better choices - I would stop eating food outside that I cannot approximate in calories. I would try to eat the same food at the same restaurant that I can ask the calorie count of, which I would have added as a meal.
This links to the idea of the book “measure what matters”