Is your iPhone Xs Max in continuing loop of shutting down and starting up again? OR your iPhone Xs Max works however will shut down at random?
(1) Try and Force Restart your iPhone EXACTLY as shown below and see whether that resolves the issue:
- Press and quickly release Volume UP button
- Press and quickly release Volume DOWN button
- Press and Hold the SIDE button until an Apple logo appears and then release the Side button (Can take up to 20 seconds. (DO NOT release Side Button when invited to Slide Power OFF).
(2) What is the Battery Health of your iPhone? Open Settings ➔ Battery ➔ Battery Health and let us know which percentage you see for Maximum Capacity. Also note what is written under Peak Performance. If your battery's Maximum Capacity shows a value of 80% or less then it has gone through its lifecycle and therefore should be replaced, according to Apple.
(3) If the battery health is fine then - Follow the instructions in this article by Apple ➔ If your iPhone is Non-Responsive or Frozen and see if that helps.
(4) If that does not help your phone might need service ➔ Contact Apple for support and service - Apple Support
Axel F.