You sent me back to YouTube (of courseThis style of sensor is used with and mounted close to a strong magnet you supply with the magnet attached to the rotating member. A small rare earth magnet would be the best choice because you want a very strong magnetic field from as compact a device as reasonable.
There are also Hall effect sensors that require external power.
If I were in OP's shoes, I'd do some experimenting before I installed one.