In most cases this warning goes after a relatively short space of time.
It might be worth just checking inside the port with a torch.
If a soft reboot by turning your phone Off and On does not help then a Samsung Service Centre or if applicable in your region a Doorstep Repair Service hopefully should resolve this issue for you.
I wouldn't suggest to use an unauthorised engineer to look at this as that could invalidate your limited 2 Year Manufacturing Warranty.
I wish you all the best with this.
Daily Driver > Samsung Galaxy s²³ Ultra 512Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "
I followed all the suggestions, but nothing worked. So, I took it to the local Tech. He tried the cotton swab, absorbent paper, pressure air, rice, etc.to no avail. He then decided to open it, violating the water seal, but found no humidity in the phone either. He checked the heat and humidity thermistors, and the checked out OK. Finally, he proceeded to re-solder the pins leading to the plug itself, and ,voila, the moisture icon went away and allowed the phone to charge through the USB again. Bottom line...solder points can fail in tropical environments.