1. Power adapter failure.
2. Motherboard failure.
Possible troubleshooting steps and repair solution:
First of all, test the power adpater. Make sure the apdapter outputs correct voltage. It’s possible that the outup voltage is not correct and the laptop shuts down to prevent the damge. Test your laptop with anohter known good power adapter.
If the problem still exists, even after replacing the adapter, most likley it’s the motherboard failure. Replace the motherboard.