The Ubuntu Dock, which is displayed on the left-hand side of the screen and holds pinned and running applications, comes with only a few options in the system Settings application, like auto-hide, icon size, displays to show the dock and position of the screen. This article was initially created for Ubuntu 18.04, but it still works for the latest Ubuntu 20.04 LTS.
Ubuntu Dock was forked from a Gnome Shell extension called Dash to Dock, which allows far more customization options. These options can only be accessed through Dconf (org > gnome > shell > extensions > dash-to-dock).
One important option that was left out from Settings is the ability to click on an running app icon on the dock to minimize it.So here is how to set Ubuntu Dock to allow clicking on a running application icon to minimize its window. Open a terminal and use this command:
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
The change is instant, so you should now be able to minimize applications by clicking on their icon in Ubuntu Dock.
In case you change your mind, here’s how to revert this change:
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'skip'