"Panic medic mode" computer keeps on restarting


Hi there. I am a super noob so please have patience with me. I am a songwriter and have my computer for one purpose, writing music. I use a program called logic x and until today I have had no problems with my mac mini m1 2020 running big sur. For some reason my computer keeps on restarting, with "Panic Medic Boot" showing up before restarting again. Tried reinstalling big sur but it says it doesn't have enough space on Macintosh. I have precious files on this computer that are not backed up. I tried to copy files when computer boots up but there is not enough time to copy before it restarts. I tried safe mode with same results. I also tried the command kmutil trigger-panic-medic --volume-root /Volumes/ this did not help either still restarting. somebody please help me? I would really appreciate any help. Thanks again