The content is miles outside what I know about. So the question is a mixture of idle curiosity and maybe having this answered somewhere on the Internet. It is likely I will not be able to understand the answer.
How exactly does Wiles' proof of Fermat's Last Theorem fail for $n=2$?
The other "accepted" answer in my opinion more or less misses the point. So here is another answer.
Consider the elliptic curve
$$E: y^2 = x(x - a^p)(x + b^p).$$
The $p$-torsion points $E[p]$ of $E$ form a $2$-dimensional vector space over $\mathbf{F}_p$ which has an action of the Galois group, and this gives rise to a representation
$$\overline{\rho}: G_{\mathbf{Q}} \rightarrow \mathrm{GL}_2(\mathbf{F}_p).$$
The structure of the proof is based on the idea that the shape of $E$ implies that $\overline{\rho}$ has very special ramification properties. Assuming that $E$ and hence $\overline{\rho}$ is modular, Ribet's argument shows that either $\overline{\rho}$ should come from another modular form of a weight and level which doesn not exist (which is a contradiction, and this is the part which uses modularity) or $\overline{\rho}$ is not absolutely irreducible.
In particular, in order to complete the proof, one has to rule out the possibility that $E[p]$ is not absolutely irreducible. Assuming one can massage the choices of $a$ and $b$ to guarantee that $E$ is semistable, this turns out to be equivalent to showing that $E$ does not have a ratio nal point of order $p$. But since $E$ already has rational $2$-torsion, this is not possible for primes $p \ge 5$ by Mazur's theorem (https://en.wikipedia.org/wiki/Torsion_conjecture). Without Mazur's theorem (or something equivalent or stronger) you can't prove Fermat.
Returning to the case $p = 2$, the key reason the argument fails is that $\overline{\rho}$ can be (and indeed is) reducible, but knowing that $E[2]$ is reducible is not any contradiction to Mazur's theorem. In particular, you can write down $E: y^2 = x(x-9)(x+16)$ and then this is a perfectly good elliptic curve with rational $2$-torsion points.