It’s a great emergency backup tool to have on hand if anything happens to your existing startup drive.
If your budget allows, a flash drive larger than 16 GB certainly won’t hurt.
With your USB drive plugged in, start up your Mac from macOS Recovery.

Enter a password if prompted.
When you see the Utilities window, startup is complete.
SelectDisk Utilityand then selectContinue.

From the list of drives attached to your Mac, select yourUSB flash driveand then selectErase.
pop in in a name for your flash drive.
From theFormatdrop-down menu, selectMac OS X Extended (Journaled), and then selectErase.

Disk Utility will format your flash drive.
When it’s finished, selectDoneand quit Disk Utility.
Your USB flash drive is now prepared to become a bootable OS X or macOS installer.

The process differs slightly for different versions.
The installer may attempt to open after it’s been downloaded.
If it does, quit it without continuing installation.

Connect your USB flash drive to the Mac.
Go toApplications > Utilitiesand openTerminal.
Or, typeTerminalintoSpotlight Searchto quickly open a Terminal window.

Note thatMyVolumeis the name of your USB drive.
For Catalina:
For Mojave:
For High Sierra:
After you enter the command, pressReturn.
When prompted, bang out your administrator password and pressReturnagain.

Terminal doesn’t show any characters as you punch in your password.
When prompted, typeYto confirm that you want to erase the volume, then pressReturn.
Terminal will ask for permission to access files on a removable volume.

Terminal will show its progress as it transfers macOS to the USB rig.
Quit Terminal and eject the volume.
El Capitan
When downloading El Capitan, the process is much the same.

The only difference is that El Capitan downloads as a disk image.
This process installs an app namedInstall OS X El Capitaninto yourApplicationsfolder.
Insert the USB flash drive into one of your Mac’s USB ports.
UseStartup ManagerorStartup Diskpreferences to go for the bootable installer as your startup disk, then start up from it.
Your Mac will start up to macOS Recovery.
If prompted, choose your language.
SelectInstall macOS(orInstall OS X) from theUtilitieswindow.
SelectContinueand follow the onscreen instructions to install OS X or macOS on your Mac.