You can set this on the Product dimension screen if the "configuration" dimension is active for the product master. This field is used to custom-sort dimensions on e-commerce and POS etc. For example, you would want XS to appear before S.
The screenshot is for size, but the same option is available for configuration dimension if it is enabled on the product.
For easier administration, we usually configure the global display order at the size, color, etc master forms so that you don't have to do it for each product one by one.