The macOS Dock displays apps you add to it or that you run. Here's how to make it display only apps that are currently running on your Mac. The macOS Dock app originated in macOS's early OS precursor ...
In order to hide hover cards for inactive apps in taskbar of Windows 11, go to Settings > Personalization > Taskbar > Taskbar behaviors > Uncheck “Show hover cards for inactive and pinned taskbar apps ...