SSD doesn't appear in the macOS Monterey Installer after being erased in Disk Utility
After an attempt to wipe all the data on the internal SSD and reinstall the OS I discovered that so far I have only managed to brick the MacBook. When I was trying to the wipe the data Disk Utility let me know that I am not supposed to delete APFS partitions rather whole groups. It did prompt me with a message saying that Internet would be needed when install the system later. That's fine, I have internet access. The problem is now that the SSD is no longer visible in the installer. Also, when I try to Erase it again in Disk Utility an error pops claiming the disk couldn't be unmounted because it's still being used by the kernel.
I tried making a bootable USB device (with the installer for macOS Monterey) from another Mac, but it only goes as far as the loading stage and then just stays there.
Thanks in advance.