You can emulate Nintendo games on both not so much Xbox or ps5. If you are only planning on using it at home then the rog ally makes more sense as u get extra power since u will always be plugged into power. However if you are using it on the go the steam deck makes more sense.
If your looking for a full pc replacement I would honestly look at the legion go or rog ally bc the steamdeck struggles with newer triple a titles. Rog ally goes on sale for like 480 open box at bestbuy.
Very cool