You can try a firmware "Revive" which theoretically won't delete data.
Revive or restore a Mac with Apple silicon using Apple Configurator - Apple Support
I have two M1 Macs where a macOS 13.6 and 13.6.1 update broke them where I can no longer boot them normally or into recovery mode. After a successful "Revive" I am presented with recovery mode, but macOS itself is broken. I'm still looking at options to retain the data & current OS before I look at a full firmware "Restore" which will wipe everything. I also have a third M1 Mac where trying to boot into the Apple Diagnostics resulted in a broken Mac with similar behavior as these other two. I knew I didn't like the 2018-2020 Intel Macs with the T2 security chip for similar reasons, but it seems the Apple Silicon Macs are just as bad.
FYI, it can be tricky getting the Mac into DFU Mode for the firmware "Revive" process. Plus you must use a USB only cable, a Thunderbolt Cable won't work. The USB-C cable must either have a USB trident symbol on the connector, or possibly no symbol like the Apple USB-C charging cable. This process does require access to another Mac running macOS 12.4+.