Download the installation file for your Mac.
Download the installation file for your Mac.
Check the first step of this guide for instructions on obtaining the installer. If you need a Mac to download it, someone else might have a solution that works well.
It appears to be a .app installer designed for MacOS Mojave. Works on Apple-branded machines.
It's not about the device being genuine, but ensuring you're operating on your own machine. Every Mac comes with a license for the operating system, which can only be obtained that way. So if you own a Mac, you're allowed to use it, or you can apply the same license on a hackintosh. However, if you don't own a Mac, creating a hackintosh would involve copying software, which is illegal.
It is an operating system bundled with Macs that lacks any safeguards to stop users from downloading installers or modifying them as they see fit.