You're comparing a 2d custom engine. Which admittedly you wouldn't expect to have multiple os support...but it's built on allegro, which is open source c++.
To a 3d game in Unreal Engine 5, which stresses even the best systems running dedicated gpus on windows. Do many macs offer dedicated gpus these days?
While this is technically true, in practice I've found there's always something the old PC is missing, tech wise.
Socket change. Ram version change. New version of PCIe.
Effectively you need to do mobo/cpu/ram all together.
The only other components are GPU and storage, which I agree are generally transferable, but depending on age you may want to upgrade too.
I guess PSU but that is thankfully something you almost never need to upgrade, unless your new GPU sucks down a lot more watts.
Maybe if I had an AM5 board I would be in a better state, but currently on AM4 so my upgrade paths are limited (already on a 5000 series chip).