This result follows from the well established fact that all primes numbers, with the exception of the first one which is$~2$, are odd.
Observe that for any positive integer$~n$, (a) the sum of all positive odd numbers less than $2n$ is $n^2$, and (b) the first gap of $2n$ successive natural numbers containing no perfect square is the range $n^2+1,\ldots,n^2+2n$.
I prove a stronger statement: for any set $S$ of positive odd numbers that includes $1$, if $2n-1$ is its greatest element, there is a perfect square among the $2n$ numbers $a-(2n-1),\ldots,a$ where $a=1+\sum S$.
(Apply this to the sequence of prime numbers after subtracting $1$ from the initial prime number $2$, which subtraction is compensated by the additional term $1$ in the expression for $a$.)
By the above observation (b) it suffices to show that $a-(2n-1)\leq n^2$, and since $n\geq1$ follows from $\sum S\leq n^2$ obtained from observation (a) (the sum of a subset of positive numbers is at most the sum of all).