Converting a user to a shared mailbox means the user's data can be stored without taking up a license. This shared mailbox can be assigned to one or more other users to allow them to see the user's data.
Deleting the user will delete all user data, including emails, OneDrive data and Teams conversations.