How to sort folder first for Finder in macOS
Finder by default lists directory contents alphabetically regardless of whether it is a file or a folder. It could be not very clear for some, especially if you're coming from Windows or Linux environment where folders are listed first before files.
Finder can, however, be configured to list folder first from its preferences options.
Steps to sort folder first for Finder in macOS:
Open Finder preferences from the menu.
Click on the the Advanced tab.
Check the Keep folders on top when sorting by name box.
Finder will now lists folders before files.