Let $X$ be a topological space, $x_0\in X$. I want to prove the following let $f:S^{n-1}\to X$ be a continuous map. Then, $\pi_1(X,x_0)$ is isomorphic to $\pi_1(X\cup_f D^n,x_0)$ for $n\geq 3$.
I want to use van Kampen's theorem, so I choose $U=X\setminus\{\text{centre of $D^n$\}}$, $V=int(D^n)$. Then, $U\cup V=X\cup_f D^n$ and $U\cap V=int(D^n)\setminus\{\text{Centre of $D^n$}\}$. Intuitively I think this would work. But on page 50 of Hatcher, an alternative, and in my opninion more difficult prove is given. Is my proof wrong in some sense, since Hathcer does it more extensive?
Hatcher attaches $2$-cells, but you attach an $n$-cell for $n \ge 3$. If you attach a $2$-cell, then $\pi_1(X,x_0)$ is in general not isomorphic to $\pi_1(X\cup_f D^n,x_0)$. As an example take $X = S^1$ and $f = id : S^1 \to S^1$. More precisely, Hatcher proves that $i : X \hookrightarrow Y$ induces a surjection $i_*$ on fundamental groups and determines its kernel.
So what is the difference if you have $n \ge 3$?
Independent of $n$ you argue correctly that you can apply the Seifert van Kampen theorem. You have $\pi_1(U) = \pi_1(X), \pi_1(V) = 0$. But now you have $U \cap V \simeq S^{n-1}$ whence $\pi_1(U \cap V) = 0$ for $n \ge 3$ and $\pi_1(U \cap V) = \mathbb{Z}$ for $n = 2$. This implies that $i_*$ is an ísomorphism for $n \ge 3$. This conclusion is wrong für $n = 2$.