HA core crashing randomly

Hello,
sometimes my Home Assistant installation doesn't load when entering it via the web brower or the app. After a lengthy investigation I traced it to MAYBE the core crashing and I don't know why. Let me explain:

System: It's a HA OS installation on a Raspberry Pi 5 8GB using an SSD hat adapter with the PCIe interface. So HA OS is installed on an SSD.
Right now I'm connecting remotely using Tailscale since this is a Home Assistant installation that my uncle needs and I'm not at his home now. But he can't access to the Home Assistant localy either when this happens. (That is why the IP is 100.100....)

If I go to http://IP:8123 it only loads the splash screen with the HA logo. On the console there you can see that it doesn't serves the JS files. (Even after Cntrl+F5 or opening it on a private tab or another browser like Chrome or Firefox)

If I go to status page on http://IP:4357 it doesn't load anything at all. No console errors, no HTML, nothing.
By the way, on the :8123 page it serves an HTML even after Cntrl+F5 (so it isn't a cached page on my browser) but it doesn't serves the JS as mentioned earlier.

I'm having this issue since april, so I used a SSH extension (with an encription key) to get access to the terminal using Putty if this happens. But when trying to access now...

If I hard reset the Pi (press the button until the light goes red, then start it up again) it comes back to life, but it shouldn't be crashing randomly like this on the first place. Sometimes it crashes after a few weeks, others after a few days.

What could be causing this issue? What else can I do to troubleshoot this and fix it?

Thanks :slightly_smiling_face:

To add some info, maybe helpful, you can see that HA is able to serve some HTML when it crashes like this:

Also, if I access from my Android phone, it gives this "Error while loading page XXXXXXX" since it still has some of the files needed on cache, but HA isn't able to provide the page.
Also I have tried to reboot the system using the Android phone still able to enter but since it seems that the core has crashed, it doesn't do anything.

Have you read this?

Often with this sort of problem it is down to power supply. Search this forum for raspberry pi crashing and read up about power to usb ports there has been plenty written on the subject.

Check the logs, should be easy enough to spot a crash there.