Go to the Apple menu () and choose Restart. Immediately hold down the Command (⌘) and R keys. Release the keys when the Apple logo appears. Reformat and partition your startup disk.
To use macOS Recovery on a Mac with Apple silicon, go to the Apple menu () and choose Shut Down. Press and hold the power button on your Mac until you see 'Loading startup options'. Click Options, then click Continue. Enter the password for an administrator account when prompted.