Option + double click on the corner of the window (where your mouse changes to the diagonal resize arrow).
I switched from Win10 to macOS recently and had to search the web to find this, so discoverability is certainly an issue. I suppose Apple would rather you just fullscreen a window than maximise a la Windows.