After decades of messy desktops full of files, Apple finally gave us a way to automatically organize them all into Stacks. Either right-click the Desktop or go to the View icon in the Menu Bar and choose Use Stacks. Don’t worry, if you disable the feature, it will revert your files back to their original place.
This automatically collects Desktop files into individual piles based on file type, such as images, documents, spreadsheets, etc. Click a Stack and its contents will fan out, click the Stack again to collapse it.
A nice perk here is that a Stack will remain open if you switch to an app or even click elsewhere on the Desktop.