I have this issue too, works fine with wireless charging tho.
Wired charging (original cable) will sometimes not be instant, sometimes need to unplug and plug back in.
it's not just iphone xs, experienced this with iphone 8 plus(red) ios 12.
left the phone idle overnight without charging, wake up this morning to plug in the charger.
notification showed usb accessory not supported, waked up the device and started to charge.
I have managed to replicate the issue.
Try this:
In the Face ID & Passcode, set the USB Accessories in the Allow Access When Locked section to be turned off.
Lock your device and leave it to idle for about 10-20 mins or even longer.
Plug the cable in, without waking up the device. It wouldn’t charge until you wake the device.