It's that realization that we're not 29 anymore that tends to creep in.
I have probably relied excessively on having a ridiculously fast metabolism and a tendency to be able to go from "stationary" to "back in shape" in a remarkably short time... as a result of which I probably haven't always taken the best care of myself. I also have the "benefit" of being 194cm and large framed, so a bit of weight here and there tends to not be very noticeable.
I tend to subscribe to something I learned from my elderly auntie many years back: If you try to always eat "nutrition dense" foods, you're unlikely to gain weight. Have the calories, but avoid empty calories. My body tends to tell me it's less hungry if I'm getting tons of nutrition. Part two (at least for me!) is that it's typically easier to burn more energy than to eat less food... because I'm kind of a "foodie."
That said, I grew up with the idea of "make everything from scratch" and that has been a staple in my life since I was helping my mother pull up carrots in our garden when I was four years old. So I don't really have "bad" food habits, either... just an overall tendency to be slow moving disinclined to a lot of physical activity.
I try to keep in mind that we didn't have "gimmicks" before we started having weight issues... so a good starting point is to remove "gimmickry" from your life; processed, short-cut, fast food... and (particularly an issue here in the US) "drive-thru" everything, and taking the car to pick up something from a shop 200m away.
But... I'm not going to go on too much here, since female and male bodies respond differently...