Back up your files with Time Machine or another backup method
Sign out of iCloud
Sign out of Messages
Sign out of Music, TV, and Books if needed
Unpair Bluetooth devices if desired
Restart your MacBook
On Intel Mac, hold Command + R while restarting to enter Recovery
On Apple silicon Mac, press and hold the power button until Startup Options appear, then select Options
Open Disk Utility
Select the internal drive
Click Erase
Choose APFS if prompted
Confirm the erase
Quit Disk Utility
Select Reinstall macOS
Follow the on-screen instructions
Complete setup or shut down if selling or giving away the MacBook
