As I’ve noted many times (e.g. here), when a thinker like Aquinas describes God as the First Cause, what is meant is not merely “first” in a temporal sense, and not “first” in the sense of the cause that happens to come before the second, third, fourth, fifth, etc. causes, but rather “first” in the sense of having absolutely primal and underived causal power, of being that from which all other causes derive their efficacy. Second causes are, accordingly, “second” not in the sense of coming later in time or merely happening to come next in a sequence, but rather in the sense of having causal power only in a secondary or derivative way. They are like the moon, which gives light only insofar as it receives it from the sun.
The moon really does give light, though, and secondary causes really do have causal power. To affirm God as First Cause is not to embrace the occasionalist position that only God ever really causes anything to happen. Alfred Freddoso helpfully distinguishes between occasionalism, mere conservationism, and concurrentism. Whereas the occasionalist attributes all causality to God, mere conservationism goes to the opposite extreme of holding that although God maintains things and their causal powers in being, they bring about their effects all by themselves. Concurrentists like Aquinas take a middle ground position according to which secondary causes really have (contra occasionalism) genuine causal power, but in producing their effects still only ever act together with God as a “concurring” cause (contra mere conservationism). To borrow an example from Freddoso, if you draw a square on a chalkboard with blue chalk, both you as primary cause and the chalk as secondary cause are joint causes of the effect -- you of there being any square there at all, the chalk of the square’s being blue. God’s concurrence with the secondary, natural causes he sustains in being is analogous to that.