I had a simple one two boats ago when I had a sailboat on a mooring in the early nineties.
Better ones now, lower price, more output choices.
To charge batteries, you can still pick relatively low amp output ones. This is assuming you want to just keep them topped off.
If you want to be using battery draw at the same time then you upsize to cover the amp hours you would use.
You get a blocking diode too with a panel, stops reverse flow of current out of the battery.
You get some output even on overcast days, maximum output is mid-day. If the boat is fixed in place, usually aim to south sun. If boat rotates, like on a mooring you can slightly tilt it or stay flat and let it work.
There is more, look at the sizes and outputs made. Then you need to find a safe place to mount one or them. You don't want to walk on it, you don't want light blocked, and you want to keep it clean.
Dana