I have some folder tips here that are old but worth repeating.

Double-click the upper left corner of a window to close it.

Double-click the titlebar to restore or maximize.

If you have Windows set up to open windows in separate processes (from Folder Options), holding ctrl while clicking the close (X) element in the upper right, ought to close that folder and all the folders you may have opened to get there.