Lately my note 9 has been doing weird crazy things . First it was my charger port wouldn't charge because it was say it had water in the port but the phone had never been near water next my phone would get real HOT oh lets not forget my phone would do its own thing like shut on n off start pushing things i didnt touch etc. Then it was the pen it never stay in then last abs most scariest is my charger port smells like burnt plastic when i was charging it today and when i started to smell it i unplugged it and my charger was burning hot and smoke was coming from it . Im really afraid its going to blow up.
This happened to me with my last device. Moisture probably got into the port and you tried plugging a charger inside and it short-circuited. If there is a uBreakiFix near your location they could repair your charging port