That's to be expected. Metabolism changes as we get older, and the food that we consume doesn't get burned up as quickly. Even if our eating habits don't change, it's easy to put on a few pounds and much harder to take them off. In fact, by the time you're a mature adult, you need 100 fewer daily calories than you needed when you were growing up. Some people who have never had weight problems in the past find that a new medication can have side effects.
People often gain weight if they start taking drugs that contain steroids.
And some people gain weight when they have hormone therapy or take psychotropic medications such as antidepressants. Maybe you've put on a few pounds because you've started traveling for business a lot more than you used to. Or perhaps you have young children who tie you to the home front and kitchen much more than you used to be. Working odd shifts, changing jobs, or going through a relocation can also initiate weight gain. For anyone who starts to put on weight, a gimmick diet might appear to offer a quick fix.