Problem programming a conveyor to stop near a proximity sensor

The essential first step is to pick a proximity sensor and verify that it works in the intended environment.

Come back when that is done, with much better project specifications. Those will include full details of the chosen sensor, and how the belt is powered and controlled.