Chosen Solution

I have an iPhone 6s. But whenever I charge it, it charges then quickly the “accessory may not be supported” message will pop up. I tried to clean it, changed the charging port with a functioning one but still no use. I even tried to reset my iPhone and update it to the latest version. Just want to ask if there is something wrong with the board? By the way I’m using the original lightning cable from Apple. Please advise. Thank you and I appreciate your answers.

That happens when you have an unbranded cable. check the cable for genuine apple serial number.

Your PC or whatever connector you use to charge got some damgage, in the case if it is adapter clean the USB female gently.