It will require a complete disassembly to ensure that all the water and the corrosion that has occurred and is ongoing is properly cleaned away.
What you can do initially is do not turn on the phone and then you need to open the phone and disconnect the battery from the systemboard to help minimize the effects of the water.
As you know water and electronics and electricity are not a good mix.
The impurities in the water causes corrosion and provides circuit paths for the electricity which were not in the phone's operating design and could damage the components.
The phone needs to be dis-assembled and all the affected areas cleaned using Isopropyl Alcohol 99%+ to remove all traces of corrosion and water. Do not use "rubbing alcohol" as in some cases this is only 70% IPA or less, can contain scents and is not as effective. If you do check the label to verify the amount of IPA.
Here is a link that describes the process.
Electronics Water Damage
Here is a link to the ifixit guide(s) for repairing your phone.
Samsung Galaxy Grand Prime
Hopefully after all this is done the phone might work properly again
If this process seems too daunting, take your phone to a reputable, professional phone repair service, experienced in liquid damage repair and ask for a quote for a repair. If you decide to do this, do it sooner than later.