Check whether there is a software application conflict with similar functions in the mobile phone, which causes the mobile phone to turn off automatically. If you have any suggestions, delete one.
Check whether your iPhoneXR has escaped from prison. Although you can have more access rights, it will also lead to bugs in the mobile phone system, which will lead to the automatic shutdown of the mobile phone. If yes, it is recommended to restore the mobile phone to the factory settings.
Check whether the charging equipment used by the mobile phone is original. If it is not original, the cell phone battery may be damaged due to different current and voltage, which leads to such a situation.
Check the battery condition of the mobile phone to see if the battery is bulging and aging. Observe whether the mobile phone will automatically turn off when the battery is low. Check whether the connection between the battery and the mobile phone is loose.