Hello hlinak,
Let's start by making sure macOS is all up to date using the steps below:
1. From the Apple menu in the corner of your screen, choose System Preferences.
2. In the System Preferences window, click Software Update.
If your System Preferences doesn't include Software Update, learn how to upgrade to macOS Monterey or upgrade to an older macOS, and use the Updates tab of the App Store app to get app updates.
3. Click Update Now or Upgrade Now:
• Update Now installs the latest updates for the currently installed version, such as an update from macOS Big Sur 11.5 to macOS Big Sur 11.6.
• Upgrade Now installs a major new version with a new name, such as macOS Monterey. Software Update shows only upgrades that are compatible with your Mac.
You can also find those steps in this resource: Update macOS on Mac - Apple Support
Additionally, does that behavior persist if you boot your Mac into safe mode using the steps from this resource: How to use safe mode on your Mac - Apple Support
It can take a few extra minutes to boot into safe mode. Your screen may flash or flicker while in safe mode. Those behaviors are expected. Testing in safe mode runs a check on your disk, removes some cached files, and can help isolate conflicts with startup items. Once you've tested that, you can restart to leave safe mode.
Should that still continue, you'll want to reach out to Apple Support so they can look into this further: Contact - Official Apple Support
Take care.