On the Dock, click on the Preferences icon (at the bottom) and then Tasks settings.
There you can see “Order Tags”, where you can choose between By Number or By Name. If you choose By Number they’ll be ordered from the most used ones to the least used ones. If you choose By Name they’ll be ordered alphabetically. After you’ve made your selection just click “Done”.