Folder Sort is an Obsidian plugin that adds folder sorting to the native File explorer sort menu.
It adds two options directly under Obsidian's file-name sort options:
Folder Sort only reorders folders. Files use Obsidian's built-in file sorting behavior. You can place folders first or last.
2 Folder sorts before 10 Folder.Folders first or Folders last.Folders first as the default placement.

Open the File explorer sort menu and choose either Folder name (a to z) or Folder name (z to a).
You can also run these commands from the command palette:
The default direction is A-Z.
Use Settings > Community plugins > Folder Sort to choose the Folder placement mode. The default is Folders first:
Folders first: move sorted folders above files.Folders last: move sorted folders below files.The Hidden folders panel shows all manually hidden folders. Select Unhide beside one folder, or Unhide all folders to restore all hidden folders. The Folder Sort: Show hidden folders command also restores all hidden folders.
Right-click a folder in the File explorer and use Pin folder or Hide folder below Move folder to....
Pinned folders stay above other folders and show a purple pin marker on the right. Pinned and hidden folder choices follow folder renames and moves.