Part of it is just super popular hardware that will outsell every home Nintendo home system ever made. Handheld systems normally have a low software attach rate compared to home systems, probably cuz lots of people treat handhelds just as secondary systems to play on vacation or occasionally on the go. I know that's how we treated Game Boy growing up, would basically get a new game or two for summer before a family vacation. Switch, though it is actually a portable, due to its hybrid nature is considered a home system so has high software attach rates. Combine this with the fact that it will end up being the best selling Nintendo home system ever, and since it is about to pass the NES, only the Wii sold better so far, but the Wii had tons of systems sold to casual gamers who didn't pick up the big Nintendo IPs, instead they played Wii Sports, Just Dance, Wii Play, Wii Fit, Mario Kart which is why those games had monster sales while Galaxy, Zelda, Smash, etc didn't have Switch-like numbers.
And part of it is the fact that with Nintendo has been completely hitting it out of the park with their new games. Sure they have a lot of ports, and obviously Mario Kart is a much loved port, but BotW, Odyssey, Smash, AC all have been accepted extremely well, which creates fantastic word of mouth for people to go pick up other Nintendo games as well.
When you add home console attach rates, the fact that Switch is about to already be the second best selling home system from Nintendo ever, Switch targeting gamers not non-gamers like the Wii, fantastic word of mouth about Nintendo games, and absolutely stellar versions of the numerous main Nintendo IP, you get mega sales.
Basically Nintendo is THE hot company in gaming since the Switch came out and they are pumping out incredible first party games on the fastest selling system of all time outside of the DS and Wii.