If you brick your mac — you need to connect it to another mac to restore using Apple Configurator app, but if you don’t have second mac — you’re in trouble.
You can install MacOS on VMWare and run Apple Configurator from it.
I didn’t find lot of information in the internet about using Apple Configurator in Virtual MacOS, so I tried to make it myself.
Apple Configurator (https://apps.apple.com/us/app/apple-configurator/id1037126344) requires MacOS version 12.4 or later (as for now), so you need to install one of the latest versions to VM.
I tried QEMU (docker-osx), VirtualBox and VMWare, and last one worked best.
I wasn’t able to configure USB passthroug for QEMU with Docker-OSX for some reason, so it didn’t work for me at all.
In VirtualBox I was able to install MacOS, run it, install Apple Configurator and even connect bricked Mac to it, but, during Revive or Restore procedures — Mac reboots couple of times, and VirtualBox doesn’t reconnect USB device automatically, so each time I was needed to select USB-connected Mac manually, and Apple Configurator was breaking during the process.
Then I tried to make the same in VMWare, it has checkbox, to auto reconnect USB devices once they’re disconnected, and it worked well, and I was able to unbrick my Mac.
First, you need to install MacOS on your VMWare (that you can get from here — https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html), you can follow the steps described here — https://www.makeuseof.com/tag/macos-windows-10-virtual-machine/
After that you need to install Apple Configurator on you Virtual Mac, just search for one in App Store.
And then, follow the steps, described on Apple’s website for you architechture:
https://support.apple.com/guide/apple-configurator-mac/revive-or-restore-an-intel-based-mac-apdebea5be51/mac — Intel
https://support.apple.com/guide/apple-configurator-mac/revive-or-restore-a-mac-with-apple-silicon-apdd5f3c75ad/mac — Apple Silicon
Basically, you need to connect you broken mac to correct port, other side of the cable connect to the USB of your PC, passthrough USB device to virtual machine, run Apple Configurator, Revive/Restore your Mac.