Hello!
Does the phone still turn on at all/show any signs of life? And also what liquid was spilled onto it? We need more info!!
Anyway, the best thing to do is remove the casing so the phone's logic board is exposed (This isn't needed so don't do so if you aren't confident but it speeds up the process). And then put the phone in a bag of rice ensuring the whole phone is covered (The rice absorbs moisture) and leave it on a windowsill in the bag of rice for a few days to a few weeks depending upon how bad the water damage was.
Please note: If you disassemble the phone ensure all electrical parts are placed in the bag as all of them could've been damaged.