Step down voltage regulator not working with inductive prox sensor
The LM2576 needs a high current path for the input.

You can't run the wimpy output of a prox sensor into the input and expect it to work.

Connect the LM2576 input directly to your 24V supply.

temporarily ground pin 5 (ON/OFF) and verify that the power supply is actually delivering +5V.

Then disconnect pin 5 from ground and attach it to the bk wire of the NPN version of the sensor.

That should allow the +5V output to be controlled by your sensor.