It's true that Steam Deck technically has a bigger library, but a lot of that stuff isn't as playable with the Steam Deck's small screen, lack of keyboard and mouse, and low specs.
The PS5 is backwards compatible with the PS4, so it has a higher quality library of stuff that can actually be played on its specs and control scheme.
Now if you could hook the Steam Deck up to a TV Switch style in a user friendly way (I'm sure it's possible, just not in a braindead convenient way) that might be different, but only in terms of the screen size.