IPhone 12 Pro randomly shuts down
I have an iPhone 12 Pro which I got this year around May 2021. For the past 3-4weeks it randomly shuts down and shows a black screen. Sometimes I connect the charger and it restarts or I have to do a force restart. It is currently running iOS 15.2 but issue is becoming a bit annoying. Is there a way to fix this problem forever?
P.S I didn’t drop the phone at all.
iPhone 12 Pro, iOS 15