I want the functionality where after every 24 hours, my stateChanges fields updates to 0. (see the circled field).
Any help would be appreciated.
There is no such functionality built-in in Firestore.
A possilbe solution would be to use an HTTP Cloud Function which will alternate state and invoke it with a Cloud Scheduler cron job every 24 hours.