And just like any other dream to come true, having a flat tummy takes time. Having a flat tummy cannot be done overnight. It cannot even be done in a week. At least in my case.
As for me, it took me around three months of consistent discipline to not eat carbs and sugar.
What I found effective is I follow a fasting schedule of at least 12 hours. During that time, I do not eat anything. I find more effective if I can extend my fasting window for longer than 12 hours. After that, I allow myself to eat healthy, non-carb, and non-sugary food or drinks.
I eat veggies, hard boiled egg and nuts at around 10 AM, then have my protein rich lunch (usually chicken and fish), then have my dinner before 8 PM. Then I repeat that the next day.