12V and 24V-Stripes can be connected and operated on the Shelly RGBW2.
The RGBW2 controller recognizes the connected supply voltage itself. Nothing needs to be set for this. Even a change from 12V to 24V and of course vice versa is not a problem.
The App setting (SETTINGS -> DC SUPPLY VOLTAGE) to the voltage is only for the calculation of the power. Therefore it's only relevant, if you want to evaluate the power either by cloud or home automation system.
An incorrectly set voltage in the app is not harmful electrotechnically, but it causes an incorrect display oft the electrical Power! So of course you should set the right voltage to avoid / exclude electrical overload.