my iphone xs max keeps restarting
so a few weeks ago i accidentally hit my phone and it cracked pretty badly. i didn't think anything of it since the phone was still functioning properly up until now. i just got home from an errand and when i sat to use my phone, it died suddenly so i went and charged it. it worked but it suddenly restarted then this just kept repeating everytime. it would just restart whenever id open it. when it would survive open long enough, it would give me a message saying that they couldn't detect if the battery on my iphone isn't genuine. I've had this phone for 5 months and never had this issue. i don't know if its connected to the cracks on the back of my phome or if water got inside the cracks somehow but does anybody have an idea what happened to my phone? i don't have the money to have to fixed yet or replace it so any help or information would be appriciated. x
iPhone XS Max