Decks are always sorted by... well, by alphabet, kind of. Actually unicode codepoints (and ignoring case at least on desktop).
There are some edge cases if you use non-English letters, they might not be sorted where you expect them.
So the easiest way to sort decks is to make them sort that way.
01 Basics
02 Fundamentals
03 Definitions
04 Math concepts
...
12 Complex stuff
13 Uh-Oh
In this example, I used a leading zero because 2 comes after 10 when you sort strings.
Some people use special characters or even unicode symbols instead, all that counts is the relative order of those characters.