To
use an LED as photodiode (receiver) you need to reverse the polarity. Connect the receiver Anode to pin 3 of the LM358, cathode to +9V.
As shown, the LED will not work as receiver but as emitter, too.
Trimming:
Turn the potentiometer all the way up to +9V, the output should go low and the buzzer/LED be off. Then turn the potentimeter down until the output goes high, buzzer starts to beep, then turn the potentiometer back a bit so the output is low again. The circuit is now trimmed.
Note that the transmitting LEd should light the receiving LEd as directly as possible to generate a good signal. A better choice than using two LEDs is a
fork coupler which not only has the correct alignment of tgransmiter and receiver but also a much more sensitive phototransistor as receiver.