Bricked M1 MacBooks (and Mac Mini/Air)

It seems M1 MacBooks are having some problems after erasing the SSD. You can’t install Mac OS and not boot into any operating system other than the recovery disk. Apparently there is a fix by putting it into DFU mode with another Mac and connecting via the USB-C cable.