iPhone 14 shuts off automatically when not on charger
I have an iPhone 14 and have had it for less than a year. Every time I unplug my phone, it automatically shuts off, even though the phone is at a decent percentage. At first, it took a couple of minutes to shut off, but now it's automatic, and I can hardly use my phone anymore. Can someone please help me? Additionally, I'm unsure if this could have contributed to the problem, but I had cracked the back of the phone, which may have also contributed to the issue.
[Re-Titled by Moderator]
iPhone 14, iOS 18