The step of making USB-installer is described at the following WWW page.
How to create a bootable installer for macOSThe steps are the following:
https://support.apple.com/en-us/HT201372
- Download macOS from the App Store. When the macOS installer opens, quit it without continuing installation.
- Connect your Mac to the USB flash drive or other volume that will be used as the bootable installer. Make sure that it has at least 12GB of available storage.
- Execute the following commands in Terminal(This example is for High Sierra).
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ macOS\ High\ Sierra.app