Make a backup with Time Machine.
Restart your Mac in recovery mode. For this, press the power button and the Command+R shortcut. Restart your Mac in recovery mode. For this, press the power button and the Command+R shortcut.
In the pop-up window select Reinstall macOS.
Click Continue and follow the steps provided to install the latest version of macOS.