Selling accounts is something different. That's not selling games, that's selling accounts and it is not something I'd recommend anyone do.
As a Seller.
It bars you from using the same details for any future accounts on that platform. You will need to give the buyer access to your e-mail, so that email account is also gone, so rather inconvenient if you use that e-mail for anything besides that game store account. it can also be dangerous as the person buying the account can use it for, let's say, "other purposes" than playing the games in your library. They could use the account to front money laundering or sell, let's say, "controversial" digital goods, all of which could get traced back to YOU in the end. They could possibly access you phone number, social media accounts and even bank details held on that account if you're not careful.
As a Buyer
You can't be sure how those games on that account were obtained. They could have been bought with stolen credit card information (fraud), the login info could be wrong or they could change it after you bought it, especially if they have things like 2-step verification enabled or even just use fake screenshots to con people into thinking they're buying an account that doesn't actually exist.
Selling accounts is not illegal as far as I know, an even if it were it would be impossible to enforce, but it's not safe and It's certainly not a comparable substitute for selling used games on PC. I would beg anyone considering it not to do it.