I don't know what voltages inductive proximity sensors use, but in general it's inexpensive to use 3.3V–5V logic level converter modules. These typically are bi-directional interfaces that use an N-FET and pullups to the two supply voltages to interface different-voltage logics.
See the "Bi-directional level shifters" section of the TAKING IT TO ANOTHER LEVEL: MAKING 3.3V SPEAK WITH 5V article at hackaday.com for a circuit explanation. See gearbest.com and sparkfun.com and Adafruit for inexpensive modules.
Note, for finding small screws in carpet, a search coil as used in a metal detector might be a better choice than a proximity sensor. The coil is part of a tuned LC circuit; metal near the loop detunes the circuit slightly, producing a tone by heterodyning.