@mahmoudibr13858 could e a power issue or it could be a thermal issue as well as many other reasons. You are not telling us what OS you are using or what you are doing while it shuts down. I would start off and run the Event Viewer and review the error logs. See if that tells you more. If you are using Windows, do this to view your logs:
# Press the Windows key + R to open the Run window
# Type eventvwr and click OK
# Expand the Windows Logs menu
# Select the type of log you want to view, such as Application, Security, Setup, System, or Forwarded Events
# Click on an event log to view the recorded events
Let us know what you find out.