Apple intentionally restricts some upgrades to particular machine hardware IDs, even though the hardware may be perfectly capable of running the upgrade. It's their way of aging out obsolete machines and forcing users to keep upgrading.
I have a couple 2008 Mac Pros I've upgraded all the way to High Sierra by patching the installation media, though Apple tried to do away with them as of El Capitan. I haven't bothered with Mojave or later due to video card issues, though I'm exploring some Hackintosh possibiities since I do prefer the interface and user experience in MacOS to that of Win10.
As mentioned, you can get UniBeast and an installation image to create a patched install drive on a 16Gb or larger thumb drive - though I had troubles getting my old MacPros to boot with those and ended up patching an install image on an old SATA drive and actually installing that in the box.
You can find instructions at tonymacx86.com.