The PC is more money up front, but drastically cheaper over the lifetime of the product. It's also more versatile, and capable of upgrading along with almost infinite backwards compatibility for older titles.
Consoles will be a couple of hundred (or thousand, depending on the PC you chose) cheaper, but you are forced to buy games within its ecosystem, usually at full retail price - a library of 10 AAA games will cost $600 on console, where you can get the same library on Steam for half or less of than that by simply keeping an eye on sales. The console won't be upgradeable. You cannot easily pirate games, and there's no such thing as DRM free gaming. And backwards compatibility is janky or simply removed for most consoles.
The only place consoles really win out is in live social gaming - it's a lot easier to get a group of friends to play PS5 on the couch than it is to get them to play PC on the couch. Aside from that, though, it's sort of like comparing a tricycle to a Harley... yeah, they're both bikes, but the differences become real clear once you get out on the road.