If you are unable to access the data from your iPhone that is damaged due to water, you can recover it from iCloud backup, iTunes backup, and also using a third-party data recovery software. Following simple solutions for Recover Data from Water Damaged iPhone.
Case 1: The iPhone can be accessed after the damage but the stored data is not available.
Case 2: iPhone cannot be accessed