This is revisionist history. People told SO that they were leaving for YEARS because of how incredibly toxic it had become. It was already giving outdated answers before ChatGPT shipped, because new questions/potentially updated answers were [Closed] [Dupe] immediately.
Their answer was essentially "We aren't a Q&A site, we're trying to be a knowledge base! So closing all questions on a Q&A-stylized site, and extremely abrasive moderation, is working as intended."
They entirely did this to themselves. The community was toxic, their policies were toxic, and they didn't listen when warned as such repeatedly - just doubled down.
The Monica affair was one of the first symptoms.
In 2023, Stack Overflow had already started making unpopular pro-AI moderation decisions, and in 2024, they started mass banning everyone who deleted their questions and answers in protest. I don't think it's wholly incorrect to say "AI killed Stack Overflow" when the death blow came from crazy pro-AI decisions from the admin.