Home Assistant Keeps Restarting Randomly

Are you running out of RAM?

Use the System monitor integration to check this and send you an alert when it gets to high levels.

Otherwise here is some advice on troubleshooting: