Phone battery issues
So I have an iPhone XR, I’ve had it for a good two years at this point and it hasn’t shown any problems until now. A few weeks ago my phone started dying at 20%, and would come back at 12% every time. The percentage at which it would die has been increasing since then and now dies at around 42%. I don’t know whether this is a software problem or a battery problem, please help!
iPhone XR, iOS 14