To better understand Euclid's proof it helps to look at slightly more general number systems which actually do have finitely many primes. For example, let's consider the set $Z$ of all fractions whose denominator in lowest terms is coprime to $\,2\,$ and $\,3.\,$ It is easy to see that these numbers are closed under addition and multiplication because we can always choose the product of denominators as a least common denominator, since numbers coprime to $\,2,3\,$ are closed under multiplication.
In $Z$ any integer-prime $\,p\neq 2,3\,$ is a unit (invertible) since, by definition, $\,1/p\in Z,\,$ having denominator coprime to $\,2,3.\,$ Generally, since units divide everything, they play no useful role in factorizations, so we ignore them. Thus, just like in $\,\Bbb Z,\,$ where we ignore the units $\pm 1$ in factorizations, in $Z$ we can ignore all integer-primes $\,p\ne 2,3\,$ in any factorizations. So every nonzero element of $Z$ has a factorization of the form $\, 2^j 3^k,\,$ unique up to order and unit factors.
Now lets try applying Euclid's proof. Starting with the prime $\,2\,$ we add $1$ and obtain the prime $\,3$. Next we form $\,2\cdot 3+1 = 7\,$ and look for a prime factor. But this fails, because $\,7\,$ is a unit in $Z$ hence it has no prime factors. The same occurs if we add $1$ to any nonunit $\,2^j 3^k\,$ with $\,j,k\ge 1\,$ since it will be coprime to $\,2,3\,$ so it will have no prime factors in $Z$.
Notice also that the same proof as for integers shows that every nonunit in $Z$ has a factorization into primes - simply take its integer factorization and ignore the integer-primes $\neq 2,3.\,$ But this proof does not imply that there are infinitely many primes in $Z.\,$ Indeed, one easily verifies that the only primes in $Z$ are $\,2,3\,$ (up to unit factors).
Euclid's proof fails in $Z$ because the numbers generated can be units, hence have no new prime factors. For number systems that have "few" units, one can work around this obstruction to obtain a generalization of Euclid's proof, e.g. see my proof here.