There are plenty of YouTube videos (and of course web pages) out there where people engage in the task of building a PC at the same price as a console (currently the PS4 Pro being of course the most popular comparison) to see if the PC offers the same performance, or even better. Almost invariably, it does.
However, these projects are often deceptive because they are ignoring hidden costs.
Almost invariably they will have a budget of approximately the price of the console... and will spend the entire budget on the base PC hardware and that's it. In other words, the motherboard, PSU, CPU, GPU, RAM, a hard drive, and the PC case. Then they test its performance at playing games, and compare it to the same games on the console.
However, this is deceptive. They are actually spending more money on the hardware than they should, and are ignoring the hidden costs that you would need to pay if you actually wanted to build such a PC to play games. They are also not actually offering all the same capabilities as the console.
For starters, the console always comes with a controller. I have yet to see the price of a controller added to the PC in any of these comparison videos. If they wanted to make the comparison fair, they would actually need to use the actual controller of the console (ie. PS4 or Xbox One). Incidentally, both controllers are usable on the PC, and can be used to play games. And it's not exactly cheap. If you want the same controller, that adds at least 50€ to the overall price, at minimum. That's quite a big chunk of the overall budget (when are talking about a total budget of about 400€ or whatever).
However, more importantly, I have yet to see the price of Windows being taken into account in the budget.
Sure, sure, you could theoretically just run Linux in your budget PC, and be able to play some games with it. However, let's face it, if you want a real gaming PC, you just need Windows in it. There's no way around it. Not only does Linux support only a fraction of PC games, it unfortunately also runs them less efficiently (most probably because the GPU manufacturers can't be bothered to create optimized graphics drivers for Linux.) Unfortunately Windows is just a practical necessity, if you want a real gaming PC, and there's no way around it. You have to add that to the cost if you are being honest.
And Windows isn't exactly cheap. For example here Windows 10 Home costs about 135€. Even the OEM version isn't much cheaper (only like 10€ or so cheaper.) It's really expensive. If you are doing this kind of comparison project, and you are being honest, you really have to allocate that sum in your budget.
And suddenly you find out that almost 200€ of your budget goes to the OS and the controller. That's like half of the entire budget right there. You now only have a bit over 200€ for the actual hardware. Suddenly the comparison isn't looking all that good after all.
So actually no, I'm not convinced that you can actually buy a PC with comparable specs that has the same performance as the console, at the same price. Not if you include everything that you would need in order to actually play games, and using the same peripherals.