Nintendo has never needed to compete on frame rate or vRAM to be successful
Made by Nintendo means that it'll be a super locked down device that only plays games made by Nintendo or a rather small list of 3rd party game makers. Developing for the platform is expensive and requires an extremely lengthy certification process. This means that all the games are reasonably high quality, sure but it also means that small developers or games with some adult content will never make it.
The Steam Deck, on the other hand runs an enormous library of Steam games and new games crop up every day. It also runs Switch 1 games! The barrier to entry is tiny and it's actually possible to mod games which is probably the single most important feature in modern gaming if you want your game to last and be popular for a very long time.
The Steam Deck also runs Linux which means hackers all over the world can make it better. Even simple shell scripts that automate common tasks provide an enormous benefit! You can automate synchronizing your save games between your PC and your Steam Deck wirelessly, for example without much effort because it's just (mostly) normal Linux.
The Steam Deck is general purpose hardware in a portable form factor running a general purpose operating system that's been optimized for (portable) gaming. If you want a feature you can make it happen yourself or ask the monstrously huge (and obsessed) Linux community for assistance.
The Switch is locked-down, application-specific hardware in a portable form factor running an application-specific operating system that's severely locked down and can't be modified or improved in any way by end users. If you want a feature you have to ask Nintendo and pray.
It's hard to cross-port from PC/PS/Xbox to Switch because it is so far behind. Not impossible, of course, but if you're choosing to target Switch from the start you're often committing to building your game on all platforms without using some modern technologies or new engine features. If you're backporting from a more powerful platform then you might need to make significant (expensive) changes to get it running.
It's mostly a developer cost calculation, but one that can keep new titles away from the Switch.
(Could GTA VI run on Switch 2? I'm pretty sure Nintendo would want that even if it's not their traditional user base.)
Nintendo's "moat" is their exclusive IP and single-screen multi-player party games, which other platforms have largely forsaken. Their competition is still mostly PlayStation and Xbox, too. (Steam Deck sales are a rounding error.) So portability is still an edge for now.
I do hope Steam Decks become more mainstream, though.
Nintendo has correctly decided that if it can attract all the low requirements indie titles plus offer its own games, then it has an extremely compelling product. Which it does, it outsold Sony and Microsoft combined.
Modern PCs, PS5 and Series X have greater resources available and newer hardware that allows for more advanced shaders, among other things, which are simply not performant or even possible on the Switch.
If you want to support these features AND support Switch or low-powered devices as well, you are making the business decision to build and maintain two codepaths and to duplicate, rework and maintain a second set of assets.
The cost often doesn't work out, so the choice is either support Switch and don't have a game that looks as good as contemporaries (a reasonable choice for indies, but graphics do sell games), or to ignore the Switch (maybe hire a studio to back-port it later if it does well enough).
Games companies and Nintendo would love for more big titles to be on Switch.