Other have said it already, to lose weight, calories in < calories out.
To really get a handle on things, you need a food scale and measure in grams.
I've lost over 50# since I was suspected of T2D. I started with 225g carbs/day (lower carb, but certainly not keto) and I do about 40% protein, 30% both fat and carbs.
The goal was no more than 60g carbs/meal and another 45g/day in snacks. I've dropped my carb goals down to 200g/day now, meaning about 55g/meal and about 35g in snacks give or take.
My fasting blood sugars are normal almost every morning simply by limiting my carb intake.
I don't deny myself anything, but I don't allow myself to eat as much as I once did.
Using the food scale is key. Measuring cups and other estimation methods usually result in serious inaccuracy.
Check out this story from the BBC about an actress who thought she had a slow metabolism. Spoiler alert, she is bad at estimating how much she eats.