If you are using a ListView or Datagrid, then you can sort the data by the pre present controls,
You can have a look at the doc, by clicking the link below,
Or you can use a microflow, and then using list operation you can sort the list,
Let me know if you have any issues,
Hope it helps!