iPhone 8 will only restart when plugged in
My iPhone 8 will only restart when it's plugged in, regardless of the level of battery charge. Once it's restarted, I can uplug and everything is fine. It doesn't have a problem keeping the charge or shutting down - only this issue with needing to be plugged in. How can I fix this?