Instead of creating a huge mess in the Dock, you can set windows to minimize directly into the app icon itself on the Mac.
De-Clutter Your macOS Dock by Setting Windows to Minimize Straight into the App Icon itself Rather than the Corner
Whenever you minimize a window on the Mac, the default behavior is this - it simply slides into the corner of the Dock as show in the screenshot below:
While this behavior does make sense, but there is a problem here with it; this will simply clutter up the Dock until it turns into a slim strip of app icons which is near impossible to navigate.
Thankfully, Apple allows you to simply minimize an app window straight to the app icon in the Dock itself. For example, if you have Safari open and you click on the yellow / minimize icon, it will simply drop into the Safari app icon in the Dock. If you want to access a particular instance of an app, just right-click on the app icon and open the window which you want.
Here's how you can enable this feature.
Step 1. Launch System Preferences.
Step 2. Click on the Dock & Menu Bar option here.
Step 3. Now click on the Minimize windows into application icon option to enable it.
While I prefer this way of how apps are minimized but mileage may vary among users. It's a good idea to keep this feature enabled for a day or two and see how it works out for you. If it doesn't, for any reason at all, it's best to revert the option to how things were.
I wouldn't call this feature a game-changer, but I will label it as a great way to de-clutter your desktop and rid the Dock from tons and tons of minimized window icons in the corner. Once you get the hang of it, you will realize how much easier it is to keep track of things around your workflow. You no longer have to sniff through tiny icons in the corner to see what is what, when you can just use the app icon itself as a starting point for finding exactly what you need.
For more helpful guides and tutorials, head over to this section.