Most people agree that cutting calories is the key, and exercise helps. No magic. But one major fact that is too often overlooked is the mental aspect and how to persist with your diet until you have lost the weight you want.
My trick was to target a very specific date. Let's say 3 months from now, at 10:00 AM. I wrote down that date, say "June 10 at 10:00 am".
Then I swore to myself that, until that very specific date, I would not cheat. Not once. Ever. I would not eat any meal that is not specifically designed to cut calories. I would not eat any snacks other than those I had already selected as allowed.
Then I started the diet with that date in mind.
Having that immutable target date constantly in my mind helped me a lot in resisting temptations to eat more during the diet. As soon as a thought like "Yum, that would be so good!" popped into my brain, it was immediately stopped and rejected as unacceptable.
Good luck!