iPhone XS Max lightning port charging issue


So Just got my new iphone. and noticed this issue I’ve been having. I connect the lightning cable to my phone to charge and most of the time it’s automatically charges. However I’ve noticed several times plugging the phone in and no charge comes up. Tried unplugging and plugging back in, sometimes it’ll work. I started to test it out. And I noticed the times I plugged it in, and I get no charge, I‘d leave the phone alone for 10-15 seconds. I pick it up, the screen illuminarea and then the charging symbol pops up. ive Tested these only with apple cables. So I’m thinking it’s either a port issue or possibly software. Any ideas or recommendations ?