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 depends on your perspective of MacOS. If you see it as a free operating system that Apple installs, you're sharing your data voluntarily. If you think Apple sells the OS itself, then using it could be considered theft since no Mac license was purchased.
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.