Good afternoon apathyash,
Welcome to the Apple Support Communities!
I understand that when you right-click on the Messages icon in the dock on your Mac you're not seeing who your notifications are from when you were able to previously. I also see that other apps are functioning as expected when you perform this action. I know it's important to be able to see who your messages are from; I'd like to help. First, try these steps:
If you continue to have trouble, use these steps to start your Mac in safe mode and check for the behavior again:
"Start up in safe mode
To start up in safe mode:
- Start or restart your Mac, then immediately press and hold the Shift key. The Apple logo appears on your display. If you don't see the Apple logo, learn what to do.
- Release the Shift key when you see the login window. If your startup disk is encrypted with FileVault, you might be asked to log in twice: once to unlock the startup disk, and again to log in to the Finder.
To leave safe mode, restart your Mac without pressing any keys during startup.

If an issue doesn't happen in safe mode
If an issue doesn't happen when your Mac is started in safe mode, try restarting without pressing any keys.
- If the issue comes back, you might have incompatible login items.
- If the issue doesn't come back, it was probably caused by a cache or directory issue with your startup disk, which safe mode fixed."
Use safe mode to isolate issues with your Mac
If the behavior seems resolved in safe mode, restart your Mac normally and test again. If the issue persists in safe mode or after restarting, use these steps to test for the behavior in a new user: How to test an issue in another user account on your Mac
Let me know what you find.
Take care.