There is no built-in time-to-live mechanism in Cloud Firestore. The common approach is to run a piece of code at an interval, e.g. a Cloud Function triggered by something like cron-job.org.
Have a look at these questions for samples:
- Delete firebase data older than 2 hours
- How to delete firebase data after "n" days
- Impelementing aging in a Firebase real time database
- How to schedule a Cloud Functions to run in the future in order to build a Firestore document TTL
While these are for the Firebase Realtime Database, the same approach applies to Cloud Firestore.