There are plenty of ways to do this. It depends on what components you have access to?
You can use the 555 timer, some inverting gates (NOT, NAND, NOR), CD4013, 74HC7474, a comparator/op-amp (LM311, LM393, uA741) a microcontroller or even a couple of transistors.
Here's how to do it with a 555 timer which has the advantage of being fairly simple and can provide up to so will directly drive a relay. Unfortunately it also uses lots of power so you'll need to use the 7555 with higher resistor values or another CMOS solution if it's going to be connected to a battery continuously.
View attachment 41411