According to a kinesiologist, it depends. Each individual has their own set of goals why they're going to the gym, and depending on their physical constitution and personal preferences, it might be better for them to start with one over the other.
Essentially, according to Randal Claytor, an exercise physiologist from Miami University, if your purpose for going to the gym is more generalized i.e. staying healthy, losing weight, or just enjoying working out, then it doesn't matter which one you start with, as both will provide you with similar benefits.
Things become a bit trickier when you have a performance-oriented goal, e.g. high-level athletes who are working toward more specific objectives like improving their speed, mobility, or quad strength.
In these cases, Claytor suggests doing resistance training first as it reduces what is called the "interference effect" which slightly decreases the benefits an athlete would gain from doing both exercises as they have competing influences.
Or, depending on their performance goal, they might want to start with aerobic exercise first. Furthermore, it would be best to take long breaks in between, especially when transitioning from one type of exercise to the other.
An in-between that he suggested was to do short bursts of both exercises, called "microcycles". Basically, they do a few minutes of weights followed by a few minutes of running, etc.
One important thing to note was that Claytor suggests that even though people who don't have performance-oriented goals in mind need not worry about the order with which they sequence their exercises, it would be best to still do both in one session.
(Image credit: Graham Mansfield/Unsplash)