There is an old saying “You are what you eat.” In practical terms, that means 80% of your weight gain is contributed to your nutrition habits.
Other contributors are a sedentary lifestyle, an absence of activity, lack of sleep, anxiety, depression and sometimes a hormonal imbalance. Surprisingly, this bunch of important factors covers only 20% of the problem.
What you put into your mouth is significantly more important in terms of weight loss, health and longevity than working out. Four times more, actually. Not the contrary.
This rule is universal. It does not matter if you are a male or a female. This does apply to you.