question about signals from NPN - 4 -wire proximity switch
The proximity switch is working perfectly it's just you are a little confused about how this NPN type sensor works.
Let me explain it in a simple way its an NPN type sensor therefore it has an internal NPN type transistor connected to both output pins black and white.
Also, both output pins will have an internal Pullup resistor attached to prevent them from floating input.
See in the image how the transistor network is there inside such sensor imag3e only shows only one Transistor but actually there are two transistors.

Now our sensor has two output wires-

Black wire NO(Normally Open):-
It means that in an ideal state when no object detected the internal NPN transistor connected to this wire will not be in conducting state (No current flowing from collector to emitter).
And if we measure the voltage between Black and Blue(GND) it will show us the voltage level of Brown(VCC) which is 12v. We get 12v due to the pull-up Resistor connected internally. And as a result load device connected to this pin will not be turned on when no object detected as there is no voltage difference hence no current flow.

White Wire NC(Normally Closed):-
It means that in an ideal state when no object detected the internal NPN transistor connected to this wire will be in conducting state (current Is flowing from collector to emitter).
And if we measure the voltage between White and Blue(GND) it will show us 0V. Because the internal NPN transistor is conducting and has pulled the logic level to the Ground. And as a result load device connected to this pin will be turned on when no object detected as there is a voltage difference so the current will flow.


And reverse will happen for both when an object is detected the Black NO will become NC and will show 0v when measured. White NC will become NO and will show 12v when measured.