Be patient and take your time Patience is key. Place your phone in a cool, dry location with good air circulation. As hard as it may seem, do not turn it on for at least 24-48 hours, ideally ...
Leave your iPhone in a dry area with some airflow for up to a day. You can try again to charge or connect an accessory throughout this period. It might take up to 24 hours to fully dry.