then better is to get your phone to Samsung service centre, this could be the manufacturing defect which they can help to replace or repair. Mine was out of warranty period so I took the risk. you may not want to take this risk and forfeit the warran...
my s10 was also not detecting the charger or any c type device. it could be carbon accumulated around the charging slot. What I did was I cleaned the slot with thin niddle wrapped around with the thread and sprayed colin on it and cleaned the touch ...