Ideally, you want a “starting” battery for each engine, connected thru switches capable of directing power to either (or both) engines.
A third battery is typically used as a “house” battery, which would be used to run any 12V equipment when at anchor. This allows both of the starting batteries full power when needed.
There are many types of chargers out there. Often they will have the ability to charge 2, 3, or even 4 batteries (banks) at a time when connected to shore power. The multi-bank chargers do not interconnect the batteries, only charge them. That’s why switches are important.