There are many “different” proofs of the irrationality of $\pi$ which are all based on the same underlying idea. The proof I describe in this post is also based on the same underlying idea as all the other ones you'll find in the wild, but in a different presentation, one I personally find clearest for helping me understand what is going on and in what directions it generalizes. Incidentally, this simple proof shows not only the irrationality of $\pi$ but also the irrationality of $\pi^2$.

Let $f(x) = \cos(\sqrt{x})$, and, as is conventional, let $f’(x)$ denote its first derivative and more generally $f^{(N)}(x)$ denote its $N$-th derivative (with respect to $x$).

Note that $f^{(N)} = P(y)f + Q(y)f'$, where $y = \frac{1}{4x}$ and $P$ and $Q$ are integer coefficient polynomials of degree growing at rate at most linear in $N$.

[This follows inductively from $f^{(2)}$ having this form, which is just the fact that $\cos'' = -\cos$, translated to this reparametrization.]

But, for any given $x$, we have that $\left|f^{(N)}(x)\right| \sim \left|f^{(N)}(0)\right| = \frac{N!}{(2N)!}$ as $N$ grows large.

[This can be seen from the easy Taylor series expansion of $f^{(N)}(x)$; the $=$ is immediate, and the $\sim$ follows from each term dominating the next as $N$ grows large (if you're worried about commuting limits here, it's justified by dominated convergence).]

Given this super-exponential rate of decay, it cannot be that both $y$ is rational and $f$ and $f'$ are in rational ratio.

[If $y$ were rational with lowest-terms denominator $d$, then the smallest nonzero value integer polynomials of degree $O(N)$ in $y$ could produce is $\frac{1}{d^{O(N)}}$, which is a merely exponential decay rate; any fixed linear combination of such polynomials with weights in rational ratio (i.e., integer multiples of some common weight) would also therefore have a merely exponential decay rate.]

In particular, plug in $\sqrt{x} = \frac{\pi}{2}$, at which $f$ vanishes, to conclude $y = \frac{1}{\pi^2}$ is irrational, which is to say, $\pi^2$ is irrational.

More generally, this establishes that wherever $\frac{\tan(z)}{z}$ is rational or infinite, $\frac{1}{z^2}$ is irrational, which is to say for nonzero such $z$ that $z^2$ is irrational. (This includes, for what it's worth, the case of complex $z$; indeed, the whole thing might as well have been phrased in terms of $\cosh$, but people find $\cos$ more familiar.)

Of course, the corollary people talk about most is that thus $\pi$ itself is irrational.

As it happens, we know even more than this; we know that $\pi$ is not merely the square root of an irrational, but is in fact a transcendental number (that is, it is not a root of ANY nonzero polynomial with rational coefficients). The proof of that, and many further transcendentality results, is actually along similar lines as seen here, but worked out to greater extent and sophistication. I shall hope to digest and write that up to my satisfaction as well, some later time.