The usual way to tidy a messy folder is three steps: make a new folder, name it, drag the files in. Finder can do the first and last step at once. Select the files and press Control-Command-N.
Apple’s shortcut list describes it plainly: Control-Command-N creates a new folder that contains the currently selected items. The new folder appears in the folder you’re in, with the files already inside it, and all that’s left is giving it a name.
Select the files > Control-Command-N
Shift-Command-N a new empty folder instead
A Downloads folder is the classic case. Select the six PDFs that belong to one tax year, press the shortcut, name the folder “Taxes 2026” and they’re filed. The same works on the desktop after a round of screenshots.
The caveat is the near-twin shortcut. Shift-Command-N makes an empty new folder and leaves your selection where it was. Press that one by mistake and you get an empty folder while your files stay put, so no harm done, but it’s easy to think the trick doesn’t work. Also keep in mind the files are moved, not copied: they leave the folder they were in.
Further reading: Mac keyboard shortcuts (Apple Support)