I can honestly tell you that it is not a license infringement because many people custom build a PC and run MacOS on it just fine.
Just because it runs fine doesn't mean that it's not license infringement, of course. You can't buy macOS, IIRC, it only comes with Macs that can run it. I've never read the full license agreement that you have to click through, so I don't know what it says. But I'd be surprised if there wasn't a clause in there that says Apple reserves the right not so support (or even actively prevent) running on non-Mac hardware.
They have no way of telling if you run a fully legal licensed copy on MacOS hardware or not.
I'm 99% sure that they can. They may choose not to do anything with that information, though.