How a solar charge controller can work on both 12 volt and 24 volt
If it has a microcontroller, you can have it detect what the voltage is and if it's within specific ranges 11-14V for example, have it do something. If it's within a different range, 18-28V for example, do something else.