I want to make an auto power cut off for my battery charger
A couple of things.

A 741 cannot source or sink very much current.  Look up the resistance of the relay coil to determine how much current it needs to operate.  It probably is more than a 741 can deliver.  The solution is to have the 741 output drive a transistor, and the transistor drives the relay.

The input voltage range of a 741 is limited, and does not extend to either power rail.  So if the chip is powered by 12 V, it will not operate properly with 12 V on either input.  The input voltage range is specified on the datasheet.

To diagnose both problems, disconnect the relay from the 741 output and measure the output voltage as you change the input voltages.