In Azure Cosmos DB, the Time-to-Live (TTL) feature works based on the item's last modification time, not the creation time. The TTL value specifies the duration in seconds after the last update to an item, after which the item is eligible for deletion.
When an item is created or updated in Cosmos DB, the TTL value is reset. If the TTL value is set to a specific duration, such as 365 days (31536000 seconds), and no further updates are made to the item within that duration, the item will be marked for deletion.