After fetching a list of items be able to sort the returned items before you use an Apply to Each.
You can filter an array.... Sort is the next obvious requirement.
This is so frustrating. Sorting an array was built-in Nintex back in 2007! I have a large and complex query that I need to sort, but cannot find an action that sorts the array or even an expression... 😞
I found this manual for sorting an array:
But.... it should be a built-in function in flows.
There is also another blog post as a work around https://sharepains.com/2020/03/05/sort-an-array-in-power-automate/