Thank you very much for responding to my post.
I have very little third-party software installed. Even if only two applications, Terminal and Telegram, are open, the flickering continues.
I also want to add that not all applications flicker, only some of them. Here's a list of the ones that flicker: Telegram, Terminal, Contacts, and Notes.
At the same time, applications that do not flicker at any refresh rate include: Safari, Messages, Maps, and Mail.
I minimize applications to the Dock using the standard command+m method. The flickering persists in safe mode.
I set the screen refresh rate to 60 Hz, but nothing changed. The flickering continues as before.
An important observation is that minimizing an application to the Dock using the command+m shortcut and then reopening it from the Dock by clicking on it causes the flickering. If I close the applications using the close button (X), reopening them from the Dock by clicking on them does not cause flickering, and they open normally without any issues. However, this is not a viable solution because closing Terminal with the close button resets the session, and Contacts closes completely.