Hey ZetaMD2Be
Good to hear you are back on it! It takes a lot of courage to get started again after setbacks.
You mentioned that your behaviour became a habit. That struck a chord with me - because the truth is realising my behaviour was controlled by my own habits enabled me to begin making more permanent changes to my life.
The yo-yoing between weights comes from ignoring years of ingrained habits, letting the cravings build and then eventually relapsing. It sucks, hard.
We all screw up, fail. In fact if we don't fail sometimes then I honestly don't think we are trying hard enough at life.
What's important is to look at what went wrong when we fail and learn from it. If you throw yourself into a diet plan, restrict everything that you eat and ignore your base cravings and the habits that you've developed then this could be the cause.
It can take time to fully integrate a new diet into your lifestyle - so if you struggle making one diet stick for the long term you could perhaps just try changing one thing at a time (ie, swap out one bad meal for a healthy meal each week).
Sounds like it would take a long time, but after 21 weeks that's 3 healthy meals a day on your chosen way of eating and you've given your body time to adapt.
Stick with it, if you become too overwhelmed with it all, that's fine. Just take a step back, figure out what is going wrong and learn from it and tweak your approach.