OK, let's get this out of the way:
1. SO question numbers dropped precipitously before AI came along.
2. AI clearly finished the job.
I took the graph from this very page and annotated it with the public launch of ChatGPT in November 2022.[0] Yes, the decline hastened after that, inarguably. But also, it was already nearly 50% down from its June 2020 local maxima. This is also inarguable.
SO had been flatlined since 2014 and declining since 2017. It bounced when 2.5 years after its 2020 bounce, ChatGPT came along with the death blow.
I contend, and I'm backed by facts, that AI is not what started the avalanche. It killed any slim chance of a comeback, but that wasn't the beginning of the end. The end was already well begun by then.