I think your PC could likely be fixed since it is at least turning on and giving you an error message. But the time and effort are not worth it. I like keeping my old ones running for 10+ years because I find it fun, but it isn’t economically efficient.
It’s pretty easy to remove a hard drive from a broken old PC, if it’s a desktop you need nothing beyond a screwdriver and it takes 5 minutes or less.
Ideally if you are going from one desktop to another, there will be an extra drive slot in the new desktop for the old HD, giving you extra space on the new one.
In any case, the “booting” is done from the main drive on your new PC. The old drive from your old PC connects a lot like a USB flash drive. It happens automatically. So if the drive itself isn’t corrupted, you plug it in with the cable I linked to, and it shows up on “My Computer” as an extra hard drive.