If your data (pictures, contacts, notes, messages, etc.) are important to you, and you don’t have an iTunes backup or an iCloud backup, then you should immediately head out to a nearby repair shop and have them lift the screen and disconnect the battery. In the meantime do not try charging it.
Alternatively, you could do it yourself. Follow this link for tools and detailed instructions.
Next, if the iPhone only boot-loops (by turning off then turning on only to show the Apple, then turn off again) when connected to the power charging cable, but stays off when disconnected, you may only need a new battery after be phone board and pars are cleaned and dried.
if it bootloops regardless if connected or disconnected, it may be a number of things.
I personally don’t consider liquid damage repair a DIY thing because you need to lift the shields covering the mother board (requiring special tools and skill), displacing water with a solvent, drying, testing, etc. I would recommend taking it to a reputed repair shop that can perform microsoldering. A lot of them can do it lately, but not all of Ben are yet good at it. Choose wisely.