Sounds like classic battery imbalance. First, MANY NEW LFP batteries suffer from internal cell imbalance due to several factors that are unavoidable. This occurs with premium batteries as well. Second, when stringing 12V together to make higher voltages, each battery needs to at 100% SoC to make certain what has happened to you doesn't happen.
You need to charge each to full individually as 12V before placing them in series.
The battery voltage didn't spike. The inverter did. I suspect the 18V battery hit BMS charge protection, stopping the inverter from charging instantaneously, and the inverter over-volted because there was nowhere for the charge current to go, and it needed a few milliseconds to respond and shutdown the charger. In that brief period of time, the charger over-volted.
Recommend you break down the bank, place them in parallel and charge them to 14.4V and hold for 4+ hours.
The 18V is odd. Many will drop to a slightly lower but normal voltage for a 12V battery, like 12.5-12.9V.