Query mongo yesterday

Ahh, ok so you have a database with a collection, lets call them Database and Collection and the collection has documents like this:

{
    _id:'XXXXXXX123456',
    documentDate:ISODate('2023-08-10 11:23:000000')
}

And you want a query that does always gets data from yesterday without needing to update it every day to enter yesterdays date?

Or…

Do you want to extract the document date from the ID field and then use that to look for documents that were created yesterday as opposed to a field you’ve set on the document being for yesterday?