The order can be influenced by a few factors. Sometimes it's based on your interaction with those people, like who you message or view the profile of more often. Also, Instagram's algorithm might play a role in deciding the order.
Well, it's not always straightforward. Instagram's system seems to take into account various things like how recently you engaged with someone or maybe even their popularity. So, it's hard to say for sure who will be first exactly.