There are multiple levels of deletion in Exchange Online, but generally speaking if a user hard-deletes a message, the maximum period you can recover it for is 30 days. Hard-deleted messages can only be recovered by an admin, by following the instructions here: https://video2.skills-academy.com/en-us/exchange/recipients-in-exchange-online/manage-user-mailboxes/recover-deleted-messages
If you have a requirement to preserve data for more than 30 days, you should switch to an SKU that includes the Exchange Online Plan 2 license, which in turn allows you to put mailboxes on hold. There are different kinds of hold, but all of them require "premium" license and can be used to preserve data immutably and indefinitely. Litigation hold is easiest to set up and covers the entire content of a given mailbox, if you need some granularity you can use retention policies instead.