Consoles can be cheaper. But people tend to make pretty unfair comparisons. They don’t count the TV they already have, but they do count the PC monitor for instance.
Buying the bare minimum PC will be far cheaper than a current gen console. Hell the steam deck is only $400. And that’s got the cost of its small size.
It varies a lot though in reality. It waxes and wanes with the new console generations on top of that.
There are a lot of hidden costs in consoles and hidden savings in PCs. They apply to more people than most realize too.
Controllers cost more than the games now, paying for online access forever. Games are almost always more expensive than on PC. And steam actually has sales unlike console games. They tend to only get discounted when they are really old.
However PCs/laptops will cost more upfront though usually. But the hidden savings here is if you already needed a PC. Really, if you already need a PC, just getting one that can also game is a cheaper upgrade than buying an entirely new console.
In the end the real choice to be made is what games you really want to play since cost differences are negligible. Also if you prefer to play in the living room on a couch or at a desk. Some people want that separation of work PC and game console too. Consoles are definitely still superior in the living room, but that advantage is slowly eroding.