Chosen Solution

my phone only power on or restart when the phone is pluged in is that a battery issue?

It is most likely to be your battery which you can replace following this ifixit tutorial: Google Pixel 3 XL Battery Replacement hope this helps! :>