Back up your data
Sign out of iCloud
Sign out of iMessage
Sign out of FaceTime
Unpair Bluetooth devices
Restart the Mac
For Apple silicon or Intel Mac with T2 chip, enter Recovery Mode
For Intel Mac without T2 chip, enter Recovery Mode
Open Disk Utility
Erase the startup disk
Quit Disk Utility
Select Reinstall macOS
Follow the on-screen instructions
Set up the Mac or shut it down for the next user
