Your Galaxy Note8 device supports water- and dust-resistance of IP68 level.
IP68 rating means complete protection from dust ingress, and temporary immersion in up to 1.5m of freshwater for up to 30 minutes.
But, if you charge the device while wet after USB port is exposed by water, there is the risk of short circuits and device may damage.
To prevent this, Galaxy Note8 limits to charge properly when USB port is wet by humidity, moisture or water and displays the caution notification text with water recognition icon on both notification panel and AOD screen.
At that time, dry the device thoroughly before use and keep it during certain period of time at a well-ventilated place.
Additionally for faster drying, it will help that you hold the Galaxy Note8 while speaker of device is facing down and shake device smoothly a few times. Or, dry device thoroughly using cool wind.