weight gain on zoloft is pretty common actually. your doctor's right to mention it - happens to a lot of people because ssris like zoloft can affect appetite, metabolism, and how your body handles cravings, especially for carbs. some folks see it stabilize after a few months, others keep gaining. the thing is, it's not always just "the medication made me hungry" - sometimes it's a combo of the drug plus feeling less anxious means you're not burning stress energy the same way, or you're moving around more normally after being wound up before.
whether you should switch depends on how much this bothers you versus how well the zoloft's actually working for your anxiety. an 8-10 pound gain sucks, but if your anxiety went from terrible to manageable, losing 10 pounds is way easier than dealing with severe anxiety again. worth asking your doctor about alternatives in the same class (some people do better on different ssris) or whether adding something like a little extra movement or tweaking carbs helps offset it without nuking your mental health gains. if you're at month 4 and it's still climbing, that's worth following up on instead of just waiting.