Thunderbird can move folders to different hierarchies using drag and drop. However, it is not possible to move them within the same hierarchy, i.e. reorder them.
The "Manually sort folders" add-on had helped to sort folders, but with Thunderbird 115 (Supernova), it is no longer available. It is time to make it a proper feature.
I was involved in the development of the add-on to make it Thunderbird 78 compatible and later as a collaborator. So, as an option, I have considered developing another add-on for Thunderbird 115. This may not be impossible. (John is providing a POC.) But I would like to consider implementing the ability to sort folders properly in Thunderbird.
My current thinking and the work required has been described here.
1846550 - add ability to manually sort (order) folders in folder pane (mozilla.org)