my iPhone XS randomly shuts down
my iPhone XS randomly shut down while I was using it and every time I tried to turn it on the apple logo would show up for a few minutes before the screen would go black again. I tried this a few times until the phone showed me the screen that tells me I need to charge my phone. I put it in the charge and it said it was charging and has been for 2 hours now and yet it will not charge. I tried force restarting it. I tried using my laptop but iTunes won't identify it. I tried putting it into recovery mode but it won't work. I don't know what to do now because it isn't backed up and I really don't want to lose everything
[Re-Titled by Moderator]
iPhone XS, iOS 12