Originally People hacked OSX to run on PC’s , now people hack PC’s to run OSX/Macos.
Key to this is clover bootloader. When a guid hard drive is created there are 2 partitions made a main partition and an EFI partition. When the PC goes to boot it tries different EFI partitions in order of preference until it finds one with an EFI folder and then executes the boot loader in there.
In a hackintosh this also contains configuration information which macos interacts with macos boots because it see’s a real Mac. It’s kind of an emulation but essentially Macos uses the SMC chip to talk to the hardware in the EFI is a virtual SMC which does the same thing.
So if you can format a usb stick and add install osx whatever to it and set up the clover bootloader with a config that suits your hardware and it can boot the installer then you can run macos or osx.
This might not be a great match at first but you mostly can tweak it till your hardware has drivers or kexts in apple speak. Once osx has installed you can copy the . EFI folder from your USB to the EFI partition on your hard drive. So on your hard drives EFI partition there is a folder called EFI, it has information thats used to boot your other partitions if they are bootable.
Ok so any 64bit intel processor will work to some extent. The lowest that can run recent macos is sandy bridge which has an integrated graphics card this is 2nd gen third gen is ivy bridge and this is actually good enough to run metal (just) Mostly you will want to run a supported GPU. Now nvidia used to make osx drivers right up to High Sierra so even a card not used in real macs would work most of the time but since they fell out with apple they are not making drivers for mojave. You are really stuck at high Sierra or use an AMD supported card or a supported nvidea card.
If you look at macs that can run metal they all have a discrete graphics card or a sky lake (6th gen) CPU or better. The biggest thing is is the Hvec codec you need that 6th gen or newer CPU or / and a gtx950 or better graphics card its supposed to be possible with all the GTX cards but I don’t know for sure.
So you can make a budget mac with an older processor that can still run most of modern macos but HVEC encoded videos may really drive your CPU hard.
The other thing that maybe an issue is how much ram you can install on older cpus you might be limited to 16GB of DDR3 ram. This may be a consideration of course the newer generation CPU’s are going to cost more as are more powerful graphics cards.
In interesting effect of running vanilla osx /macos and having the hack in the EFI is that as long as the hardware is supported a regular mac created usb disk install will run in your hackintosh. Mine is for high Sierra but i found that i could run El Capitan Sierra , Mojave installed on usb drives just by booting to clover bootloader and selecting which partition I wanted to boot from. You see once the EFI is sufficiently enough of a mac then the operating systems will accept it as a legitimate mac.