Crashes because of an Recorder error/corrupt database

Hello, I have an issue with my HomeAssistant instance. Every couple of days (in random intervals) my installation gets the following errors and becomes inoperable (only hard restart through replugging the USB-C cable helps):

Does anyone know what may be causing this error? Does anyone have a suggestion? A couple of days ago I completely reinstalled HA (without a backup) and today this error happened today at night. I was hoping to get rid of this error with a new installation. On the previous instance I had the same issue. Is this a hardware related issue?
I’m using a Raspberry Pi5 with a Geekworm X1003 (NVME hat) and WD_BLACK SN770M 1TB M.2 2230 NVMe
HA Core/Supervisor/OS are up to date.

I hope for some help

Bets Regards,
Bart

it says you have a corrupt database.

But why does it happen all the time? There must be a reason for this. Did I do something wrong? And the most important: how can I prevent it from happening in the future?

Best Regards,
Bart

Difficult to say. Is your power supply good enough?

I’m using the official Raspberry Pi 27W USB-C Power Supply. Is this not enough?