Go to Tools -> Options... -> XAML Styler -> Attribute Ordering Rule Groups
In Attribute Ordering Rule Groups should have a bunch of text.
If you just want to format the xaml in alphabetical order, delete all the text, just write the only character "*" then you're done.
If you want more complicated rules then ChatGPT or Bing Copilot should be able to help you.
I figured this out by just asking AI.