The fifth way is taken from the governance of the world. We see that things which lack intelligence, such as natural bodies, act for an end, and this is evident from their acting always, or nearly always, in the same way, so as to obtain the best result.
Things that lack intelligence, that is what he calls natural bodies, like stones, planets, water act for an end, that is purposefully; and this is because they act, in the same way - that is regularly; he also notices things like water do not act regularly, but they almost do - that is despite their irregularity, there is in fact regularity in their motion.
He also notes that they act in the best way. One can say that the best way is to follow a law, which is exactly what they do; they follow a natural law.
A concrete example may help here: what is the purpose of a stone? It is to follow law - that is Gods law. And because it follows Gods law it is following the 'best' law. One might think of here of Liebnizs 'best of all possible worlds', or in natural science, the trajectories of particles follow the 'best' line - geodesic.
The uncertainty in quantum motion isn't a problem here; as he explcitly says 'nearly always' in the same way. Variation is allowed as long as it is ordered.
Hence it is plain that not fortuitously, but designedly, do they achieve their end. Now whatever lacks intelligence cannot move towards an end, unless it be directed by some being endowed with knowledge and intelligence; as the arrow is shot to its mark by the archer. Therefore some intelligent beings exist by whom all natural things are directed to their end; and this being we call God.
This is the argument from design. Its often treated quite dismissively. But I believe Kant treated it with a great deal of respect.
With what we now know about the world & the universe; its far better to say that the laws are 'designed' so processes like evolution can occur whilst following natural law.
He also implies that without God that motion cannot happen. Physics describes motion, it doesn't explain how. For example take Newtons firs law: a body moves in a straight line. This is a description. But why it moves from one point to another, and how it does so cannot be explained. Of course I've simplified the scientific explanation for the purposes of clarity. One can go a bit deeper into the physics of it. But, just as in mathematics, when one reduces to the axioms, and one can ask why these axioms - the only proper reply is that they are self-evident; as they are to those that take the trouble to understand them. If this sounds circular - it is.
What is self-evident is where we start from. Even Descartes famous 'cogito' the exemplary doubt is self-evident.
It's a strong argument and I don't believe it can be refutable from logic. This doesn't mean that the argument doesn't need updating or generalising to make it more transparent for the modern era, as in fact it seems that Aquinas himself did for his time; but that of course does not mean one has to accept it.
Its noticeable that many creaton myths across many cultures use this argument, but of course in the idiom of myth.