Connect like shown below
The signal to he arduino will be inverted, so you need to detect when it is LOW

Yes, 2N3904 OK
The sensor common (COM) connects to the Arduino GND, the transistor emitter and to the 24V power supply negative.
The GND/shield can connect to the Arduino GND
Great.
Many thanks for your continued support, it has been very helpful!
Will be in touch to share results after testing the setup ![]()
