I tried factory resetting my Macbook Air following a guide on Macworld, and the first thing I did I went to Disk Utility (in Recovery Mode) and erased Macintosh HD - Data, but now it won't let me erase Macintosh HD. It says that it couldn't be unmounted because it is in use by process 712 (kextcache). Tried unmounting and it won't let me either. What should I do? Right now i can't even book an appointment at the Genius Bar because of Covid.
Try erasing the entire drive, not just the volumes.
In Disk Utility, Hit Cmd ⌘ 2 (or see the View menu) to show Devices instead of just Volumes. Select the overall drive you will now see over the volumes (now in a disclosure triangle instead of separate) and Erase that, GUID/APFS.
If you aren’t following an internet recovery factory erase, here is the best one:
Selecting the correct item in Disk Utility almost always gets an erase completed without reverting to the terminal app and command-line tools. Also, Apple Support is now delivered almost entirely without Genius Bar visits.