Hi there.
For a start. Those boards need a 12-24 power supply attached to the middle 2 pins that say 12v-24v/gnd on the right hand side for the inputs to work. If you don't have that then the inputs have no power.
https://warp9td.com/images/BOB_Vendo...line/ST-V2.pdf
I have no idea about the green wire but my NPN 3 pin/wire inductive switches have brn/blue/blk. Those wire in as: brn= v+, blue= gnd, blk= xyz trigger.
I assume either the blk or grn on yours are v/gnd or signal. (this is all assuming the red is v+).
You need to figure out which is the gnd wire (either grn/blk will be) then the other will be the trigger.
This is a basic image of 24v inductive switch wiring both npn or pnp: