Click Transfer or Reset.
Open Transfer or Reset settings for me
Click Erase All Content and Settings.
In Erase Assistant, enter your administrator information, then click Unlock.
Review the list of items to be removed in addition to your content and settings.
If your Mac has multiple user accounts, click Apple Support article: Erase your Mac and reset it to factory settings