SSD Failing After macOS Update?

I recently upgraded my MacBook Pro to macOS High Sierra, and now it freezes and reboots every 1-5 minutes after booting up.

I tried booting into Safe Mode, but it didn’t help. I also reinstaled macOS High Sierra from a bootable USB but the issue remains.

In Recovery Mode, my hard drive Macintosh HD only shows up occasionally. When I run First Aid on it, it says:

Error: (oid 0x3c7eb) apfs_root: btn: dev_read(1204812, 1): Device not configured
Snapshot is invalid.
The volume /dev/rdisk2s1 could not be verified completely.
File system check exit code is 11.

Your Macintosh HD is likely corrupted. Since your Macintosh HD only appears occasionally, the system likely has trouble booting from it; thus, the reboots.

Have you tried reformatting the drive? You can boot from an external bootable USB and then choose Disk Utility to reformat Macintosh HD.

If there’s another Mac, you could also try restoring your Mac in DFU mode. This will fix firmware issues, erase everything and reinstall the OS.