There is no such thing like a "12V"-heater. A heater is a heat-withstanding resistor, no more, no less. You can apply any voltage as long as you manage to deal with the produced heat.
If you apply 24V instead of 12V, you quadruple its power. 20 watts before -> 80 watts after, so expect a much quicker temperature rise. To countermeasure you can limit the PWM the firmware generates, effectively reducing the supplied voltage. Marlin has a MAX_PWM setting for this. All firmwares can limit PWM when using bang-bang with appropriate PWM_ON and PWM_OFF settings.
If you apply 24V instead of 12V, you quadruple its power. 20 watts before -> 80 watts after, so expect a much quicker temperature rise. To countermeasure you can limit the PWM the firmware generates, effectively reducing the supplied voltage. Marlin has a MAX_PWM setting for this. All firmwares can limit PWM when using bang-bang with appropriate PWM_ON and PWM_OFF settings.