You can use setSort() on your dataset to set an order:
https://www.wix.com/velo/reference/wix-dataset/dataset/setsort