In the next few hours, I will try using a multimeter to check the presence and operation of the sensor. However, just to be safe, I have decided to order a new sensor, which will arrive in a couple of days, to verify its functionality. The important thing for me was to understand if the circuit could work well as shown in the photos.
I decided to use a 9V battery because I need a wider detection range.