Legendre's (Unsolved) Conjecture Legendre's Conjecture is an unproven statement regarding the distribution of prime numbers; it asserts there is at least one prime number in the interval \$(n^2,(n+1)^2)\$ for all natural \$n\$.
The Challenge
Make a program which only halts if Legendre's conjecture is false. Equivalently, the program will halt if there exists \$n\$ which disproves the conjecture.
Rules

This is code-golf so the shortest program in bytes wins.

No input shall be taken by the program.

The program only needs to halt or not halt in theory; memory and time constraints shall be ignored.

One may use methods other than checking every \$n\$ if they can prove their program will still only halt if Legendre's conjecture is false.
JavaScript (Node.js),  49  47 bytes
A full program that stops only if there's some \$n\ge2\$ such that all \$x\in[(n-1)^2..n^2]\$ are composite.

for(x=n=2n;x-n*n;d?0:x=n*n++)for(d=x++;x%d--;);

Try it online!
Commented
for(                  // outer loop:
  x = n = 2n;         //   start with x = n = 2
  x - n * n;          //   stop if x = n²
  d ? 0 : x = n * n++ //   if d = 0, set x = n² and increment n
)                     //
  for(                //   inner loop:
    d = x++;          //     start with d = x and increment x
    x % d--;          //     stop if d divides x; decrement d
  );                  //     if we end up with d = 0, then x is prime