I've always been on the slim side my whole life so never had issues with weight but I have tried to eat healthier and exercise more as I've gotten older. I'm not a trainer or psychologist or whatever but my thinking is you have to know your own psychology and figure out how to make things a habit. What makes you tick and what works for you and fits in your life. Once it's habit, it's hard to stop it, good habits are hard to break not just bad ones.
IMO one thing would be start small, however small, for exercise or food choices. Say 10 min walk a couple times a week or a vegetarian meal once a week to get more healthy stuff in your body. Do that for a couple months and then once its a habit (imo it takes 2-3 months for some thing to become a habit that's harder to break) build on it with another step or baby step. Once you get a sort of cycle going you can build with more steps and it's harder to break that habit even though the things you're doing might be "harder" than when you first started.
Another thing for me with regards to food is I don't ever feel I'm restricting myself or denying myself. I eat tons of healthy foods (fruits, veggies, nuts, grains etc..) daily and exercise daily so my thinking is I have a lot of check marks in the positive column on a daily basis so when I feel like eating something that might not be healthy or whatever, I eat it. This doesn't happen all the time but it does at times. I don't consider them cheat days or whatever, it's just I feel like eating that so I do lol. So I never feel like I've denied myself anything or restricted myself and so then it's easy to stick with all the other healthy things I do since I don't feel limited. That's my psychology and it makes it easier to make the positive habits a way of life. When it's a habit and a way of life, it will probably stick for the long haul.
Last suggestion is do these things with family or friends for camaraderie/support but not competition (unless that is part the participants psychology/motivation). The buddy system can be a helpful thing.
Just my 2 cents.