Here’s a neat proof to show why there cannot be a maximum gap between primes-
First, you must know that X*Y+X is always divisible by X and thus not prime.
Take a number N, and compute the factorial of it. The factorial of N (symbolized as N!) is the product of all of the natural numbers less than or equal to N, excluding one.
5! = 5*4*3*2 = 120
For any number in this set, 120 can be written as Number*AllOtherNumbersInSet. For example, 120 can be written as 4*(2*3*5), or maybe 2*(3*4*5).
This is the neat part-
122 can be written as 2*(3*4*5)+2, so it is composite.
123 can be written as 3*(2*4*5)+3, so it is composite.
124 can be written as 4*(2*3*5)+4, so it is composite.
125 can be written as 5*(2*3*4)+5, so it is composite.
Extending this principle past 5! means that for any number N, all numbers N!+2 through N!+N are composite, always creating a sequence of N-1 composite numbers. By picking larger numbers for N, you can always find a larger gap!