How do i set my Arduino nano to sleep and wake up using RTC DS3231

i have been working on a project of vehicle live tracking in a school bus and require the arduino to be running only for 3 hours in the morning and 3 hours in the evening as i am using an external battery supply
but i dont know how to set the program for my arduino NANO what function should i use to cut the supply to the arduino nano with the help of RTC

but i dont know how to set the program for my arduino NANO what function should i use to cut the supply to the arduino nano with the help of RTC

You shouldn't cut the supply, just send the Nano to sleep and connect the alarm output (INT) to a hardware interrupt pin (D2 or D3), configure the interrupt handler (may be empty) and program the DS3231 before to trigger the alarm at the corresponding time. Fortunately the DS3231 has two alarm times so you don't have to reprogram at every wake-up.

There is an example, very similar to what you want, here.