Cue 50 posters telling you about a bunch of different diets…
OP you’ve answered your own question in your first post. Yes, you will probably continue to put on weight because the pattern you have tried is to go on a diet but then not stuck at it. This is so common it’s how diet organisations make so much money. Dieting sets you up to fail.
My two pence worth is to imagine yourself 6 months from now, a year from now, five years from now. Of all the suggestions you’ll get on this thread what do you think you’ll be happily and easily still doing in a 6months/12 months/( years time? What can you see starting and then it just becoming a normal everyday part of life, like brushing your teeth?
If, for example, you know you’ll never give up bread or pasta, but that you can totally see yourself making some changes where you could happily eat fewer carbs, well maybe that’s the right approach for you.
Or if you can see reducing UPFs, or booze, or sugar, or taking up training to be a triathlete, is something that you can honestly picture yourself doing for the long term, then do some research and make some small steps towards doing that.
Short term diets are bullshit and will make you fatter and miserable.
Read this.
Being able to sustain a good nutrition plan is by far the most important thing. Ignore anything you read suggesting that you try fasting or any other batshit insane diet