You can charge your phone if it’s completely dry. If it’s not, wait for a day at least to let it dry. You can use this article to make your phone dry faster. It will still require at least 24 hours to dry.