All things considered I don't think physical video games are *really* going anywhere, as much as game companies (mostly Nintendo, it seems?) keeps trying to create increasingly roundabout ways to sell digital games in the form factor of a physical video game. I guess it could happen depending on how things progress in the next one or two console generations, but I think too many people invested in buying video games like physical games and their pros for them to truly die off in the way that physical PC games did.
If you didn't know the reason behind game-key cards existing in the first place, it's really just Nintendo's fault LOL. As of now Nintendo only sells Switch 2 cartridges in a single size, that being 64 GB. Although there are plenty of rumors of varying credibility that Switch 2 cartridges in other sizes are going to become available at some point, the fact remains that right now for Switch 2 developers, the single cartridge size is very inflexible and the fact that its only in an expensive 64 GB size hurt a lot of games. For example, if 16 GB cards existed, Bravely Default HD would probably be on one of those instead :P
Besides that whole mess around the Switch 2's ecosystem though, I get what you mean about physical games seeming to be on a decline, or at the very least the console manufacturers are acting like it. PS5 and XboxSX having digital-only variants of their game consoles seems concerning, but they also sell disc drive add-ons you can plug into those consoles if you end up regretting that decision... Which is really funny not gonna lie.
More and more games are being sold in fake physical versions where either the physical media is just a launcher to get you to download the files, or they more stupidly just slap a download code into the plastic box, but I really don't think physical video games are doomed. It's not just like, a sweaty nerd thing to like your physical video games, you know? I think a lot of people like being able to just pick up a game when they see it in a store, plopping it into their console to play it, and having the opportunity to sell it if they don't like it or they've had their fill with it. You can still sort of do it with game-key cards but idk I think they really fumbled the landing. There's still a ton of misinformation floating around about game-key cards and I think a lot of average consumers understandably don't fully get what they are, since they are so new and complicated. I dunno, maybe 20 years from now all retailers will replace their video game sections with little kiosks where every video game is printed on a little gift card with a download code you punch into your console, but I think of all physical media, video games are the most likely to come out of "the death of physical media" just fine. does that make sense or am I just saying nonsense words? lol