Mac Mini - New SSD - Randomly restarting
Shutdown cause -128 is "hardware" related; most times, I have noticed it's related to memory.

What you can try:


NVRAM and SMC Reset.  Hold CommandOptionPR for about 20 seconds while turning on from a powered off state.  The boot chime should sound about 3 times; then release and boot normally.  To reset the SMC, shut down, unplug your Mac mini for 30 seconds, then plug back in and restart.
Reseat the memory modules (you may have inadvertently caused a bad connection when replacing the drive)
Run Apple Hardware Test (AHT).  Hold the D key while booting from a powered off state with the AC adapter connected.   Make sure you run the extended tests.


If your memory tests come back with errors, remove one module and try again.  Make sure you tests each module individually in each slot individually.  You want to see if the problem (if it exists) stays in the same location (slot is bad) or moves (memory is bad)