The theory is "more serotonin and then something something less depression." SSRIs definitely increase the amount of serotonin in the brain. Why and how and
if that's what helps is a mystery.
> Why boosting brain communication can help alleviate symptoms of depression, however, is unclear, she says.
> “We know to some extent what [these drugs are] doing, but we don’t necessarily know why this works for depression or anxiety,” says Edwards.
> Antidepressants quickly increase concentrations of these neurotransmitters shortly after someone starts taking the medication, says Christin Drake, a clinical psychiatrist at NYU Langone Health. But patients generally don’t start to feel the benefits for several weeks. The reason for this lag time, and what’s happening during this gap, is not clear.
https://www.discovermagazine.com/health/how-antidepressants-...
Part of the reason you can tell that we don't really know very much at all about the mechanism of action is that individual patients often have to take a little grand tour of the available medications before they find one that even works on them. Why does this SSRI work for Patient Bob and that SNRI doesn't? Nobody really knows, it's just informed guesswork.