Web forums grew rapidly ~2000 onwards. Everybody who knew PHP and a database knocked one up. And people were desperate for online participations and flooded these sites.
Today, web forums struggle because their success needs people who can read and write and who have time to participate usefully.
These people are still around but many, especially the young, are being lost to "instant satisfaction" / "one liner" places like facebook, twatter, instagram, and such.
The fact that these sites are useless for archiving knowledge, and anyway almost nobody bothers to post anything informative there, doesn't concern most people.
Then there is a lot more nastiness around. The online world has become generally nastier. This is a problem largely because everybody who comes to a web forum today has been on FB etc where nastiness is pretty much the default, and they expect to be able to do the same on the web forum. They then have to be dealt with by the mod(s) and often they don't like that.
Usenet used to be brilliant but has mostly gone under the weight of spam, and few people having a decent client for reading it.
The forum I run is modded for zero personal attacks (which is rare, and could not be done if we had adverts because kicking and biting threads bring a lot more advert clicks) and ~98% of the regular group has always been good. But over the 10 years it's been going we have had some "moments"
I have few regrets except that troublemakers should have been removed much faster. The big tech forums in the US remove them instantly and there is a lesson to learn there.
Quality online discussion will continue on quality well managed sites like this one, which have an educated audience. There it can survive. Once you get away from specialised subjects, to mundane stuff, it is a struggle and most of that will probably end up on FB where everybody has created a forum
Someone mentioned stopping search engines going in. That is absolutely not a good idea because good SEO is key to a forum collecting new people, to replace those who left, died, etc. Web forums still get the best SEO.
What is changing is the spammer landscape, because there are high value commodities they can sell. The next one will be fake vaccine passports, but I think the govts are onto that because everybody knows one of them will easily be worth 3 or 4 figures.