IR detector circuit

You need to provide the sensor with 3 to 5 volts.

The output of the sensor can be used to drive a very small 4V relay or, with a transistor and resistor, drive a 5V relay.

The transistor you need will depend on the current needed by the 5V relay.