You put three facts together – that all organisms produce more offspring that can survive, that there’s variation among organisms, and that at least some of that variation is inherited – and the syllogistic inference is natural selection.