I am not 100% clear from your post exactly what you are trying to do, but I can point you at at a circuit which switches a circuit
on when the battery volts go below a pre-set threshold
https://www.eleccircuit.com/low-volt...itor-by-lm339/ .
I've used this for an alarm, set up so that when a 12V lead acid battery has its voltage fall below about 11V, the comparator switches on the buzzer. I guess the buzzer could be replaced by a relay?
B