Nintendo and Sony have different strengths as companies. When you look at what their strengths are, then you realize that Sony has an advantage in the home console space and Nintendo has an advantage in the handheld space. Overall I would say Nintendo has a slight edge, but it is all close enough to make it interesting.
For example, Sony's biggest advantage is that it is an electronics company. That means it dominates in terms of pure hardware. Sony's strategy each time is to make a quality piece of fairly powerful hardware and then sell it at a loss. It makes the profit on the games to compensate from the loss on hardware. This is a good strategy for Sony, because anyone who tries to compete directly on hardware either has to take a bigger loss on their hardware or jack their console prices up. This is the sort of thing that killed Sega. (That and Sega's business side just wasn't as solid as Nintendo's or Sony's.) Nintendo found they were fighting a losing battle on hardware during the N64 and Gamecube Eras, so they just decided to sell less powerful home consoles since then and see if they can get that to work.
In contrast to Sony, Nintendo's biggest advantage is in making games. Everyone knows that Nintendo makes great 1st party games, but they can also make very popular games without using many resources. Like Nintendo can just take a small team and give them a shoestring budget and they end up making a game like Brain Age that sells like crazy. Sony has never really done anything like that. So if you put the two companies in an environment where raw power doesn't really matter, like the handheld market, then Nintendo is going to clean Sony's clock. Nintendo has had many competitors in the handheld space, but Nintendo just clobbers all of them.
Both companies have other strengths and weaknesses too. Like Sony has a better relationship with Western 3rd party developers. Nintendo is better with controller innovations like the analogue stick or wireless controls. Sony just tries to copy this stuff and hope they get it good enough.
Overall I think Nintendo has a slight advantage, because I think making good games is the most important thing. Overall they are pretty close though with one company having the advantage in the home space and the other in the handheld space.
curl-6 bet me that PS5 + X|S sales would reach 56m before year end 2023 and he was right.
My Bet With curl-6
My Threads:
Master Thread, Game of the Year/Decade
Switch Will Be #1 All Time
Zelda Will Outsell Mario (Achieved)
How Much Will MH Rise sell?
My Bet With Metallox