Stack Overflow has seen a substantial decline in traffic over the last year that appears to be accelerating. https://observablehq.com/@ayhanfuat/the-fall-of-stack-overflow
Not everyone is motivated by money and recognition, are you aware of that? Since humans were humans, cooperation has been an integral part of society and still is today.
Some people will always try to monetize everything, but still, people continue to develop FOSS.
ChatGPT will be no different in that regard.