First, please post code using proper formatting so that we can read it correctly. (See instructions at top of page.)
Next, a sensor like this will only update if the entity it references - sensor.shabbat_in - changes, not when time changes. If you want it to change with time, then you need to use a time-based entity in the template, like:
You need to use @pnbruckner’s solution because sensor.datetime’s state updates minutely, sensor.shabbat_in only updates when it updates. Otherwise your state will only update when sensor.shabbat_in updates.
Need to convert the sensor.datetime string into a datetime object, then convert it into a timestamp.
No need to have an if statement to specify true / false, that is returned naturally through the the check.