How to factory reset and wipe clean a macbook pro with APFS filesystem?

Solution 1:

The best option in my opinion is to create a Big Sur install key : https://support.apple.com/en-us/HT201372

Then boot from it and with disk utility you erase the primary disk.

To be able to select it cmd + 2 then you select the HDD then "Erase" and you choose APFS format and GUID partition scheme. You validate and exit Disk Utility.

Then you install Big Sur without an iCloud account. You simply create an Admin account.

And that's all.