Can I use a 12v 20A DC switch for a 24v 10A DC load?
No, you can’t, you need to respect both the maximum voltage (when the switch in open) and the maximum current (when the switch is closed).

If you open the switch with a voltage that exceeds the rated voltage, you may have an electric breakdown that will allow the current to continue flowing.

On the opposite, if you exceed the rated current when the switch is closed, the switch may fuse.

There’s nothing like rated power for a switch since an ideal switch always has either zero voltage or zero current. In both cases, the power is null.