For lithium cells, you need a protection IC or board (the "BMS board on ebay etc), plus, for series connected cells, that must include a "balance" function to maintain the cells all at equal voltage.
Then you need a charge controller set for the correct battery voltage and current limit.
A gel lead-acid type is simplest, as the only things you need with that are a fuse for safety, and a voltage regulator or limiter circuit which should be set to 13.8V for a 12V battery on long term float charge.
The cells also need a series diode to prevent them draining the battery when there is insufficient light to charge it.