Follow these steps if you want to log out of the Messenger app on Mac:-

  1. First visit the Facebook Messenger website on your browser and then login to your Facebook account using the credentials.
  2. Then you have to click on the profile icon.
  3. Now click on the option that says preferences.
  4. Then finally scroll down and locate the “logout” option and then click it to complete the process.

Read More:- https://allinsider.net/how-to-log-out-of-messenger-on-iphone/