Vasil Michev is right, and he also explains how to recover users. You can refer to the article provided.
I am just emphasizing some information.
The user's mailbox and other data are usually retained for 30 days after deletion (the default retention period, unless otherwise configured), and after the user is restored and assigned the same license as before, the user's mailbox and data will be restored, and the user will be able to access all the services they previously accessed. If more than 30 days have passed, the data may not be recoverable.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".