Sometimes, you just need to get something important done on your Mac, and blocking alerts and notifications makes it much easier to do that. A quick way to silence incoming notifications is to enter Do Not Disturb mode. A simple trick to do that is by holding down the OPTION key and clicking the Notification icon in the top right corner screen. That will turn off Notifications till the next day. But if you want notifications back on after a couple of hours, all you have to do is OPTION click on the same spot again, and Notifications are turned back on :)