Yes, that will work.
But, for Mojave, the terminal command is not quite correct. You don't need the part from --applicationpath.
The terminal command should look something like this:
Code:
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Even in that video, High Sierra bootable installer
also doesn't need the --applicationpath part of the command.