What you could also do is run some stress tests on your system. If it crashes as well, then you know you have a hardware issue:
# Install sysbench
sudo apt update
sudo apt-get install sysbench
# CPU
sysbench cpu --cpu-max-prime=20000 --threads=4 --time=120 run
# Memory - Adapt Memory as needed
sysbench memory --memory-total-size=1G --threads=4 --time=120 run
# Filesystem and I/O
sysbench fileio --file-total-size=1G prepare
sysbench fileio --file-total-size=1G --file-test-mode=rndrw --time=120 --threads=4 run
sysbench fileio --file-total-size=1G cleanup
Run one at a time, or if you want to be bad to your RPi, run multiple in multiple SSH sessions.