Google also played a part. After a while, I noticed that for my programming related questions, almost no SO discussions showed up. When they did appear on the first page, they were usually abysmal and unusable for me.
When it started all kinds of very clever people were present and helped even with very deep and complex questions and problems. A few years later these people disappeared. The moderation was ok in the beginning, then they started wooing away a lot of talented people. And then the mods started acting like nazis, killing discussions, proper questions on a whim.
And then bots (?) or karma obsessed/farming people started to upvote batshit crazy, ridiculous answers, while the proper solution had like 5 upvotes and no green marker next to it.
It was already a cesspool before AI took over and they sold all their data. Initial purpose achieved.