Getting a macintosh into DFU mode can be tricky. There is a cool tool at https://github.com/AsahiLinux/macvdmtool that lets you do that right from terminal.
First you will want to take a look at Apple Support Page to make sure you are plugging the USB-C into the right ports for each model.
https://support.apple.com/en-gb/guide/apple-configurator-mac/apdd5f3c75ad/mac
Once that is setup, grab the app here
After the download and unzipped run the follow commands in terminal where you unzipped the download.
chmod +x macvdmtool
and then ./macvdmtool dfu
and the mac should reboot into DFU mode.
Now you can use Apple Configurator 2 to do:
Revive (user data says)
Restore (all data is erased)
Terminal Restore:
Want to do a restore with an IPSW you have now too ? Great, in Apple Configurator 2, install the automation tools from the menu bar. After that completes, you can use this example to restore macOS 14 to this mac in DFU mode with the ipsw file you have. (wipes out all data…fyi)
cfgutil --verbose --progress restore --ipsw ~/VMs/UniversalMac_14.0_23A5301h_Restore.ipsw