When I'm very busy, I always turn Do Not disturb mode in all applications. I'm Windows user and I have to do it manually, and users of the macOS has built-in functionality of Do Not disturb.
This is autotranslated version of this post.
NoNotify automatically turns on a built-in Do Not disturb mode when working in selected applications.
Utility itself is located in the system tray and from there you can quickly navigate to all settings.
Settings not so much. The tray can be put to work NoNotify on pause for 30 minutes. And in the settings add an app, which will turn on do Not disturb.
There are two modes. In the first case, do Not disturb will turn on when you start the application. In the second (the frontmost to start focus), the application must be active to switch to do Not disturb.
To install (macOS 10.15+, retails for $5.99)