Hi and welcome to the forum! I am glad that I can help you.
You want to know the cause of the symptoms that you experience.
Women usually gain weight when they are in menopause. Since the protective effect of the female sex hormones is lowered in menopause, women may experience additional symptoms that might suggest osteoporosis, heart conditions due to atherosclerosis, joint issues, etc. Swelling and pain in the legs and ankles may indicate arthritis or deep vein thrombosis.
Given the data that you described, you experience weight gain and swelling of the left leg and ankle. See your doctor for further diagnosis to rule out possible deep vein thrombosis. You may need to have an RTG scan of the ankle to rule out possible degenerative processes or injury to this joint.
Please keep in mind that I provide medical information nly. I am not able to diagnose medical conditions online. Please contact you doctor for further advice and information about diagnosis and treatment options.