You can use macOS Recovery, the built-in recovery system on your Mac, to reinstall macOS. macOS Recovery keeps your files and user settings intact when reinstalling.
Important: Your computer must be connected to the internet to reinstall macOS.
Start up your computer in macOS Recovery:
On a Mac with Apple silicon: Choose Apple menu > Shut Down, press and hold the power button until you see “Loading startup options,” select Options, click Continue, then follow the onscreen instructions.
On an Intel-based Mac: Choose Apple menu > Restart, then immediately press and hold one of these key combinations, depending on what you want to do, until you see a spinning globe appear:
Install the latest version of macOS compatible with your computer: Press and hold Option-Command-R.
Reinstall your computer’s original version of macOS (including available updates): Press and hold Shift-Option-Command-R.
Reinstall the version of macOS stored on your computer’s built-in recovery disk: Press and hold Command-R.
In the Recovery app window, select Reinstall macOS, then click Continue.
Follow the onscreen instructions. In the pane where you select a disk, select your current macOS disk (in most cases, it’s the only one available).