It was more so changes to Proton, which ended up benefiting the performance of a lot of other games too, not just Elden Ring. We all know better than to expect those kinds of significant updates to Nintendo systems.
It was a problem with shader compilation and resource management within the game itself, and how they were initiated. Valve had to go around with a more aggressive shader caching system, when the dev could have fixed it within. More aggresive shader caching means more RAM allocated for it.
Shader compilation is not something a console has to deal with because they use pre-compiled specifically to the architecture the game is mean to run on. Not just that, but optimized along the way because one set of pre-compiled shaders won't work on a different architecture.
In docked mode sure, but in handheld mode it ends up being weaker than Steam Deck due to severely-reduced memory bandwidth, underclocked CPU, and less memory availability.
Steam Deck is still a PC at heart, so even with 16GB of RAM, the RAM is not unified like it is with consoles. It has to allocate a specific amount just for GPU purposes, which for that can be 1, 2, 4, or 8GB, leaving the 15, 14, 12, or 8GB remaining as main RAM. Taking just the general setting of 4GB, that leaves 12GB for main RAM (equivalent to Switch 2), but because the GPU can only access that smaller section, any game that needs more VRAM either won't run, or internally has to do aggressive swapping. So that means a copy of assets would need to be held in main RAM, and use bandwidth in order to swap. So even having 4GB more doesn't really make a difference.
As much as Switch 2's CPU clock is lower, there are double the cores, and are technically stronger on an equal-clock basis compared to Zen2. Be aware about a shortcoming of the SD, which is its APU with a 15W limitation that prioritizes the GPU over the CPU. When SD's GPU gets pushed, the CPU has to throttle down to stay within that 15W limit. Games have shown the CPU to drop to 2.0 Ghz and less under stressed GPU situations.
As far as RAM bandwidth, what leverages RDNA 2 to use less RAM bandwidth than Ampere is having Infinity Cache for the render process. The problem is that no AMD-based APU has Infinity Cache. Only their desktop GPUs have it. The PS5, the Series consoles, Steam Deck, and all these other AMD-based portable PCs have to rely on spending more bandwidth without IC. So it ends up that RDNA 2 without IC uses more RAM bandwidth than Ampere. So even with Switch 2 having ~68GB/s in portable mode vs Steam Deck with 88GB/s doesn't mean Switch 2 is being bottlenecked. As it is, Ampere utilzes around 25GB/s per TFlop, so roughly 42.5GB/s is needed to adequately saturate the GPU pushing 1.7 TFlops, leaving plenty for the CPU.
This is just focusing on the points you brought up. Switch 2 has plenty of other things that help demonstrate its strengths over SD, like utilizing DLSS and ray tracing on dedicated hardware rather than chugging on shader allocation. A hardware file decompression block that is much faster and more efficient than decompressing on the CPU, allowing quicker asset swap from storage to RAM. And importantly, uses quick a bit less power in the process.