Double-click the top of a window on a Mac and something happens, but what exactly depends on a setting most people never look at.
Open System Settings, click Desktop & Dock and find “Window title bar double-click action”. Apple lists four choices:
Fill expand the window to fill the space between menu bar and Dock
Zoom zoom the window
Minimize send the window to the Dock
No Action do nothing
Fill is the one I’d pick. It makes a window as big as it can be without going full screen, so the menu bar and Dock stay visible and the window stays on the same desktop. Apple notes that with the Dock on the side, the window fills the space below the menu bar and next to the Dock.
Zoom is the older behaviour and depends on the app: some apps grow only as big as their content needs, which can look like nothing happened. Minimize is handy if you’re used to it from older macOS versions.
No Action is for people who keep triggering it by accident while trying to drag a window.
Full screen is a different thing. Control-Command-F, or the green button, moves an app into its own full-screen space and hides the menu bar. The double-click setting never does that, so if you want a big window that still plays nicely with other windows, Fill is the safer habit.
Further reading: Change Desktop & Dock settings on Mac (Apple), Mac keyboard shortcuts (Apple Support)