iphone 13 keeps restarting itself. wont stay on longer than 2 minutes
earlier this morning, my phone was working normally. it was fully charged. suddenly, it shut off and restarted. I didn't think anything of it and let it restart. although when it turned back on it said it was at 0%. I knew this couldn't be right because it was charging all night. so I plugged it into the charger just in case. when I plugged it in, it dinged as if it was charging but the lightning symbol did not appear. like it wasn't really charging. I thought it was weird so I restarted the phone figuring it was just glitching. when it turned back on with a notification from my settings saying the battery may not be an authentic apple product. (although I got the phone brand new oct. 2021 from T-Mobile) I thought it was weird but maybe it would fix itself. the phone stayed on for a little longer while it still said it was on 0%. now, it wont stay on for longer than 2 minutes. every 2 minutes (if that) it restarts itself and when it powers back on, it says its on 0%. even though it cant be on 0% because I barely used it today and i had a full charge this morning. I've also had it on the charger all day. is there anything I can do to reset this without spending a lot of $$$?
iPhone 6, iOS 11