This article explains how to recover Exchange Online items (email, calendar entries, contacts) that have been deleted from Outlook and what can be done if an email was accidentally deleted - especially from the Trash folder. There is no similar function for Gmail.
For Exchange Online accounts, items are ONLY recoverable by this method if they were deleted in the past 30 days. Again, these methods are the only available method of recovery for Exchange Online accounts.
Further, snapshots are not taken of email mailboxes. The current state of the mailbox is the only preserved state.
Recover and restore deleted items in Outlook - Microsoft Support
Recover and restore deleted items in Outlook - Microsoft Support
Recover and restore deleted items in Outlook - Microsoft Support
Delete or recover Gmail messages - Computer - Gmail Help