Revive or restore a Mac with Apple silicon with Apple Configurator 2
https://support.apple.com/lt-lt/guide/apple-configurator-2/apdd5f3c75ad/mac
The instruction to put the laptop into DFU mode doesn't work if you're off by even one sec. I have to follow this video to get it working https://www.youtube.com/watch?v=puL82I2B6Xk