Updated June 10th, 2019.
If you want to minimize a window, you can click that little yellow button in the top left of the windows title bar. You knew that already. But, did you know that you can simply double-click anywhere in the title bar and achieve the same result? You should check it out.
There are some other choices. You could set things up so that a double-click in a window’s title bar zooms the window (see the picture below). And you could set things up so that a double-click in a window’s title bar does nothing at all. This is controlled by the Dock preferences (Apple menu / System Preferences / Dock).
I like having it set to minimize on a double-click.