Choose one of the three ways, and reinstall your macOS in less than an hour.
This step applies to laptops only. If you have a desktop Mac, skip to the next step.
The installation takes a certain amount of time and puts a lot of stress on the processor and disk, so your MacBook may run out of power at the most inopportune moment. To avoid trouble, connect your device to the power adapter, even if the battery is 100% charged.
A clean macOS installation will format the drive and erase everything on it. So you need to back the data up with Time Machine or save the necessary data manually beforehand.
You can use an external drive, a recovery partition on the drive, or a remote Apple server as the distribution source to install macOS. The best option depends on your situation and preferences.
The most fail-safe and fastest way.
You can install any version of macOS that your particular Mac is compatible with. Of course, you'll need a USB flash drive with at least 8 GB capacity, which you'll need to prepare beforehand.
A convenient alternative to the USB flash drive.
The source of the distribution is the recovery partition, which was created during the previous installation. Consequently, after reinstallation, the version of macOS will be the one you are currently using on your Mac.
A variant for situations with problems with the disk or where there is no flash drive at hand.
The installer is preloaded on the web, so you must wait. You can install the most current compatible macOS or the original version on your Mac when you purchase it.
If the computer has a firmware password, you must enter it to boot into recovery mode.
Depending on your OS installation method, the transition to the restore menu is slightly different. Proceed as follows.
Create a bootable flash drive and plug it into one of the USB ports. Turn on or reboot your Mac by holding the Option key until your computer starts. Then, select the USB flash drive in the boot menu.
Turn on or restart your Mac, then press and hold Cmd + R until the computer boots.
Turn on or restart the computer, then immediately press one of the key combinations and do not release them until the Mac starts up:
Erasing a disk is done similarly and does not depend on how you reinstall.
Like with formatting, installing the operating system is the same for either option. From the macOS Utilities menu, open "Reinstall macOS" and specify the drive you're using in the partition selection screen. Then, follow the prompts of the installation wizard.