Format your USB with these settings:
Format: MacOS Extended Journaled
Scheme: GUID Partition Map
Right click on your macOS installer app(from the previous step) and click
Show Contents Packages.
Contents/Resources and find
createinstallmedia inside that folder.
sudo [drag and drop createinstallmedia here] --volume /Volumes/USB and enter.
Follow the instructions. Be patient as it will take a lot of time.
Go to this page after finishing this part.