Welcome!
Two main things that worked for me:
1) Calorie counting. It's not for everyone, but it's often the easiest and most approachable way to start. Use this
calorie calculator to work out how many calories you need, and don't try for a short-cut by going for less than the recommended amount for fat loss. Quick fixes don't work for weight loss, that's why we're all on this forum. If you're pretty much sedentary, it'll be about 1920 calories for weight loss, which is a nice number to be working with, you shouldn't have to feel deprived on that.
2) Think about why you put on weight, what bad habits you've got into and how to approach them. I was eating when I was bored or low in energy, for instance, and was snacking when I woke up from a nap feeling a bit peckish. And most of us do emotional eating at one point or another. You may have "trigger foods", the sort where once you start eating them you can't stop, and these are probably the only ones you will definitely have to stop eating. I'm avoiding tortilla chips, for instance, as they come in such big bags that even moderation means eating a surprising amount of them. However, that doesn't mean your diet should be miserable or lacking in treats. I have a tiny piece of very dark chocolate most days and love it, and my cooking is delicious and something which I'm enthusiastic about.
And another thing which isn't a big thing for me personally (I basically put on weight due to getting ill and losing track of how much I was eating), but is a huge thing for many people: abandon guilt. Guilt should have no part at all in how you eat. If you start making yourself feel bad because one day your calorie deficit wasn't what it should be, or you even ate more than the maintenance level, then you will end up off your diet, miserable, and putting on weight. Don't use terminology like "temptation", "sin", "cheat", "bad", "naughty", or anything else from a shame mentality. Staying positive about all of this is crucial.