In the macOS User Guide, the explanation for zoom is
Zoom: Expand a window to fill the space between the Dock and the menu bar. If the Dock is along the side of the screen, the window fills the space below the menu bar and to the side of the Dock.`.
But the actual action of zoom varies from apps to apps. Not to mention third-party apps, the actions of zoom in native apps in macOS are different. And sometimes double click does nothing, sometimes it expand the window to max size, sometimes it only expand horizontally, but not vertically. In finder, it is more weird, it is very hard to explain in detail but I am very confused.