For non-critical applications like a chat/messenger, snackbar is a better option as it isn't intrusive but at the same time, has the option of undoing the action.
There's a logical difference between the two approaches
Confirmation pop-up is a pre-action check
It gives the user a second chance of making a decision and works well for destructive actions (like deletion). However, it is also considered as an obstructive approach, so it doesn't work well with non-critical and fast-paced modern applications like chat/messenger apps.
Snackbar is a notification alternative with post-action reversal
Snackbars are used more like a low-key notification tray that allows the user to quickly review or reverse their actions. In certain cases, it's impossible to reverse the action if the snackbar gets dismissed. While, in case of Gmail, the deleted email goes to the Deleted folder. It works well for non-critical applications where you want to inform the user about the action and the emphasis is not on confirmation or undoing of the action.