You can use it like that, yeah, it’s basically like a “laptop” in that sense, just a fair bit smaller.
Normally I’d recommend getting devices for a specific purpose, like a mini tower custom build for a mini PC with powerful yet efficient and affordable specs - or maybe an older used tower. Though, if cost to performance ratio isn’t as important to you as portability and ease of setup, then a Steam Deck would likely be a good choice.
I mean, look at Nintendo. Obviously aggressive legal tactics aside, they make some damn fun games because they know that gameplay matters more than graphics.