Not charging and displaying weird message
So lately whenever I plug my charger and try to charge my iPhone Xr it shows a message saying “this accessory may not be supported” and doesn’t charge or connects and disconnects continuously. This is the original charger and my phone isn’t even a year old. It takes much longer than usual to charge my phone and it last less than usual. Any suggestions on what it could be or what should I do?