Gerrald Goh, As @strongbow says, start with a hard reset and reevaluate.
Unfortunately, even though the new phones are sold as “water resistant” the seals wear quickly and a phone that has been in water does need to be addressed.
The first thing I would do is open the phone up and take out as much as you can. Logic board at the very least. XS phones has a sandwiched board, so I don’t assume you have the tools required to separate the boards.
You should at least take it out and visually inspect closely (using at least a magnifying glass) for corrosion and bad solder joints. Water WILL get into the phone, and if not immediately addressed, it will corrode and create shorts / bridges.
Applying power to a phone that has been exposed to water is about the worst thing you can do if the water issue hasn’t been fixed.