Help. My OctoPi(OS not the Pi) destroyed itself

I was printing, then suddenly OctoPrint acces just wasnt possible anymore, i hooked up a hdmi to my Pi, and see there: OS was broken and non readable anymore. 2 minutes before it worked.

I did nothing, because i dont want this to happen again and eventually destroy my SD Card, which happened to me before on my Pi with a other OS(broken version though, idk why)

RaspberryPi 4B 1GB RAM, Ender 3 with Marlin bugfix 2.1.x(old firmware was broken, so i flashed a new one on it), newest OctoPi that is available in the RPi-Imager, 64GB Sandisk SD

SD cards have a reputation for corrupting themselves. This occurs more often if the RPi is turned off without shutting down the OS. The best defense against this is to clone the SD card, see https://community.octoprint.org/t/backing-up-the-pi-sd-card/56857 for details.

Another possibility is to use a USB flash drive for the OS instead of a microSD card. See https://community.octoprint.org/t/runnin-octopi-from-a-ssd/25187 for details.

oh thx, but it happened while printing, and not while i wanted to shut the Pi off.

Probably filled the file system with logs. What size SD card are you using?

Filling up this with logs is a little more unlikely, but definitely possible with noisy broadcom error messages.