Back up your data with Time Machine or another backup method
Sign out of iCloud
Sign out of Messages
Sign out of iTunes or Music if applicable
Unpair Bluetooth devices if needed
Restart the MacBook
On Apple silicon MacBook, press and hold the power button until startup options appear
On Intel MacBook, restart and immediately hold Command-R
Open Disk Utility from macOS Recovery
Select the internal drive
Click Erase
Choose APFS or Mac OS Extended as appropriate
Confirm the erase
Quit Disk Utility
Select Reinstall macOS
Follow the on-screen instructions
Complete the installation
Set up the MacBook as new or shut it down for the next owner
