Notice that when you divide N by any of the primes that we listed, the remainder will be 1. Therefore either N itself is prime, or its prime factorisation contains only primes that were not on our list.

This contradicts the assumption that our list contained all primes, and therefore there must be an infinite number of primes.