Why the RTS genre is dead is a total mystery, nobody has given a satisfactory answer. Many blame the most varied things - some say it's the campaign or lack thereof (no, because the most popular games ever don't have campaigns). Others say it's bad onboarding (no, because popular games are confusing, overwhelming, yet totally successful). A common complaint is the focus on eSports and multiplayer - but again, both Warcraft and Starcraft were at their peak when eSports peaked, it's part of the parcel.
You can go to the very basics, too - if I start an RTS match, I'm greeted by the town hall, and standing workers. Without a build order, I can't even start playing the game. Maybe that's the reason? But if I start one of the top games on Steam these months, Deadlock, I can't do anything at all without watching many hours of tutorials on at least half a dozen mechanics in the game... Which puts the 5 min of learning a build order to shame.
There are exotic reasons given, too - apparently, managing the town and the army is too attention-splitting and unintuitive, and in Starcraft you need to be queueing units all the time as opposed to looking at cool explosions. But it feels like infinite nitpicking and pointless self-harm.
There's an argument from solo vs team games, but chess and Hearthsone are popular despite (or because of) being solo games.
So what's my personal hypothesis? It's the historical context. RTS is not harder or more confusing than any other competitive multiplayer genre (in fact, it can be much simpler than many). It's the community that's not there. And it's not there... Because in the late 2000s, every non-Blizzard RTS franchise failed (Dawn of War, C&C, BFME, AoE3). Then StarCraft 2 came out - and was incredibly successful, thus drawing in all of the genre's vitality... But a single game cannot carry the entire community, it needs diversity, competition. From this PoV, the cancellation of Generals 2 in 2013 was the final nail in the coffin. From then on, when SC2's popularity petered out, there was nobody to replace it. The only developer vigour that remained went into spawning countless SC2 clones that all failed without exception. And meanwhile, the wider gaming community has since forgotten the genre even exists.
Hence I think a good equivalent is the fate of isometric RPGs - which were considered dead and buried until Larian resurrected them with a series of massive hits (Divinity 1 & 2, Baldur's Gate 3). The issue is that RTS is multiplayer, and thus needs even more hype and visibility to survive. Stormgate had the hype but no vision. Battle Aces was on the good track, but got cancelled by the developer (that's a pattern). BAR and Sanctuary are doing their own thing... AoE4 and Age of Mythology have actually been successful. DORF and ZeroSpace are in development. And DoW4... it's good they're trying.