How can I turn an LED on only at 24 V ± 1 V?
Here is a circuit that can detect the input supply voltage between ~23V to ~25V and illuminate an LED when the voltage is within that range. Of course resistor tolerances will make this range vary slightly and as a matter of fact with the exact values given simulation shows the range to be 23.2V to 25.3V.

The circuit uses a 2.5V shunt reference part. The part number shown is a reference that was available in the simulation tool library. A different 2.5V reference (such as a low cost TL431) could be used or select a reference of another voltage and adjust the resistor values accordingly.

The circuit is also setup to allow about 10mA of current through the LED. If you have a high efficiency LED that current could be reduced by adjusting the R7 value.