I'm going to be a bit controversial and suggest that 'all of the above' are the reasons forums are somewhat in decline. But there's more. Let's see if we can't unpack them all together.
1. The web is going way more mobile
It's true, there's no denying the facts, the web *has* gone more mobile in the last decade than it ever was. And few of the forum platforms truly excel on mobile. They're adequate, acceptable, usable, but... that's it. They're still designed first for desktop and adapted for mobile. Even Flarum which is probably the nearest thing to a genuinely mobile-first experience (imagine: a forum software that doesn't handle attachments by default because mobile devices don't tend to handle files well), it's not great.
And I don't think it matters which flavour of content you want to look at, forums on mobile specifically are acceptable-at-best for all of them. No-one wants to type lots on mobile, no-one wants to deal with pressing many buttons on mobile especially when other platforms *don't*. You just hit the bare minimum and you're done.
2. The web is quietly migrating control of content away from individuals - and people prefer it that way
Following on from the above, when you upload images to a forum, you usually have some control over how you want to present them in a post - aligned with some text, or in a particular order, perhaps with different formatting for different sections. Whereas with Facebook, Twitter, etc. the control is with the platform; you just shove your content at it and trust the platform to present it for you.
We've moved from people taking pride in not only producing content but producing it in a way they are proud of, to producing content to fit someone else's needs, and at some point we collectively became OK with that.
3. People don't want to DIY
Following on from the above, running a forum/blog/your own thing is hard work. It's one of the things the Web3 people haven't figured out yet: people don't *want* to run their own infrastructure. They want to be able to do the parts they do care about (the content) without dealing with the mess that is, say, the hosting infrastructure. Those of us who want more control than just 'I have a forum platform, I can install plugins' to the point where we write our own plugins... still probably don't want to deal with the servers. I *can* but I certainly don't *want* to.
For many people the question of 'why would I run my own forum' is easily countered with 'use FB Groups' or 'make a subreddit' because this neatly folds away the headache of actually deploying a forum environment, the mess of hardware and hosting is a non-issue, and at that point it's all about the content, the part people actually cared about. *Plus* these places come with something of a built-in audience entrance ramp, in a way forums don't tend to. (Let's put aside the question of whether these places are forums or not; it's not relevant here.)
4. The needs of the one outweigh the needs of the many
Social media in particular has a fascinating take on the psychology of creation and sharing, though it's not often discussed. Specifically, time was when people would create sites for their own satisfaction, their own love of whatever it was, and post it - ostensibly for the many. It was a simpler, more innocent time for sure, and monetisation was very much a secondary concern for them, if a concern at all.
Now, though, both of these points have shifted. Social media absolutely encourages a culture of not sharing because you love something but for the dopamine reaction; we're encouraged by design to share our best life and allow others to live vicariously through ours. This is the central conceit of the influencer, if you will. This is where we're at with people sharing the food they're eating: we've successfully encouraged people to overshare about themselves in a bid for that positive hit, rather than sharing what they're interested in.
And, of course, the increasing encroachment of the corporatisation of the internet means that everything is now about money. That blog where you might have posted the odd nature photograph? Now it's a side hustle. The myth being perpetrated that if you're not making money *all the time in your life* you are living your life wrong.
5. Consumption vs creation
Following on from the above... people don't have the time/energy to spend on their hobbies the way they used to because of the broken economic systems discouraging people having hobbies.
Creation takes more effort, and if you're not being rewarded for it economically or emotionally, it's not worth the effort as per current psychological doctrine. As a result, people are switching gears and either reducing their creation output to lowest minimal effort (see Facebook and people just sharing their lives) or simply switching to consumption entirely, with creation being limited to responding.
Forums also used to offer a sort of in-built Q&A/support system; for any forum about a topic, you'd get an area for 'I need help with x' and people who were there anyway to just talk about the hobby, would be able to join in and help. But if you're not creating the forum or the ecosystem in which that happens, you end up with no support vehicle either.
Which means that you get a negative feedback loop of people who want help with x, for whatever x is, and have fewer places to turn - which means you then don't get people making *new* places in response, because that was what used to happen: people would go 'I need help with x, there's no venue for it, so I'll make one' but these days that's just not happening.
Partly because this void is sort of filled between Stack Exchange, Facebook Groups and YouTube tutorials for many things, but none of those are really viable for building communities around; people participate either for the virtual cookies (Stack) or because it's some weird side hustle mechanic.
In this particular angle, people are task-orientated and just want answers, and the venues that traditionally would have supplied, now don't.
6. The pace of life
As a direct follow-on to the 'traditional venues supplying answers', there is also the weird logic that answers to questions should be available on demand, as though support venues exist solely to support people in getting answers as quickly as possible.
The number of times I've seen online that people have posted a question and been annoyed/frustrated/upset/offended that they didn't get an answer inside an hour is... shocking. It's a weird form of entitlement that these people think they can just ask for answers and deserve/are entitled to an answer inside an hour, at any time of day, regardless of anything else.
I think because places like Discord can make it seem like the community is 24/7, that the same instant response is expected elsewhere too.
In conclusion - tl;dr:
I have waffled enough. Social media is (sorta) killing forums, mobile is (sorta) killing forums, people don't have the time/energy to participate in forums, people don't have the patience for forums - and I don't think forums can fix any of those things.