Random shutdowns that look like kernel panic
Go into recovery mode and reinstall MacOS. That sounds like a software issue. Give that a try, if the results are still the same, then you may have a bad drive.