Try running the Apple Diagnostics.
Try booting into Internet Recovery Mode (Command + Option + R) so you can try running Disk Utility First Aid and bypass booting from the internal drive. If First Aid doesn't help to get your Mac booting normally, then you may need to reinstall macOS over top of itself.
If the laptop still powers off while in Internet Recovery Mode, then you have some sort of hardware issue that will need to be repaired.
If First Aid and reinstalling macOS over top itself doesn't solve the problem, then you should perform a clean install of macOS by first erasing the whole SSD before re-installing macOS. If a clean install works, then you can restore from a backup if you had one before these issues started. Keep in mind erasing the SSD will destroy all data on the laptop so I hope you have a backup already. If not, then you will need to jump through hoops to access & retrieve your data before erasing the drive.
If a clean install of macOS still has the problem, then you have some sort of hardware issue. Do not migrate or restore from a backup until after you test the laptop with the clean install of macOS.