To erase and reinstall macOS, restart the MacBook, immediately press and hold Command + R, log in to your admin account, and click Disk Utility > Macintosh HD > Erase. To reset the NVRAM, restart the MacBook and press Option + Command + P + R for about 20 seconds once the device turns on. When this process is concluded, your MacBook will be factory reset.