To install the latest Mac OS, for example, macOS High Sierra, you can search and download the installer from App Store.
The first thing to do is to download the Mac operating system that you need. The most recommendable way to create a bootable install USB drive for Mac OS is using 'createinstallmedia' Command with Terminal application.
Use 'createinstallmedia' Command in Terminal