Handheld PCs are niche because they are basically the worst way to play PC games. They are only useful for the handheld factor as a laptop would be better suited in a lot of portability scenarios. Nobody buys a Steam Deck to play the latest PC games, you buy it as an accessory for your current Steam library. The far majority of PC gamers use a desktop or laptop.
Switch is completely different, it's a hybrid handheld yes, but is the only way to play Nintendo Switch games. Naturally it's going to sell way more than any PC handheld. That's why any sales comparison between Switch and handheld PC sales are silly, you're comparing an entire platform vs a handful of SKUs mostly used as an accessory.