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, and the existing folder/file placement is preserved.
2 Folder sorts before 10 Folder.Existing order, Folders first, or Folders last.

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:
Existing order: sort folders only within their existing folder positions.Folders first: move sorted folders above files.Folders last: move sorted folders below files.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. Hidden folders can be restored with the Folder Sort: Show hidden folders command.