Navigate to System Preferences > Dock.
Select the checkbox next to "Double-click a window's title bar to.." and select "minimize" as the option in its dropdown.
Did you know you can also minimize applications in macOS by double-clicking the menu bar? Check out our guide to see how it's done.
I always keep an eye on my MacBook's battery percentage—especially since, as a developer, I run a lot of resource-intensive applications.