For sure you will be able to power your phone and all electric devices with a normal socket when the boat is moored at a port and connected to the power grid.
During navigation, instead, and depending on the type of boat, may be possible not to have 220V electricity (this type of current is provided when there is a generator or inverter on board) so you should be prepared to take with you USB connectors to charge with 12V and not to use big electric devices in that case.
On many boats, it is also possible to have a Wi-Fi system with which you can connect to the internet. If you travel near the coast you can also easily connect through your smartphone by activating your data connection. But please take into account that when we are in the open sea, the internet is not always available, which is a good occasion for enjoying your sailing experience and contact with nature. In any case please take into account your needs and restrictions and ask the charter operator before your booking and the skipper during your trip.