I'm trying to show that if $X$ is a CW-complex, then $$ \pi_1(X) = \pi_1(X^2)$$ where $X^2$ is the 2-skeleton.
I found the following proposition in Hatcher's book:
Proposition 1.26.
(a) If $Y$ is obtained from $X$ by attaching $2$-cells as described above, then the inclusion $X \hookrightarrow Y$ induces a surjection $\pi_1 (X, x_0) \to \pi_1 (Y,x_0)$ whose kernel is $N$. Thus $\pi_1 (Y) \approx \pi_1 (X)/N$.
(b) If $Y$ is obtained from $X$ by attaching $n$-cells for a fixed $n > 2$, then the inclusion $X \hookrightarrow Y$ induces an isomorphism $\pi_1 (X, x_0) \approx \pi_1 (Y,x_0)$.
(c) For a path-connected cell complex $X$ the inclusion of the $2$-skeleton $X^2 \hookrightarrow X$ induces an isomorphism $\pi_1 (X^2,x_0) \approx \pi_1 (X,x_0)$.
(In (a), $N$ is a normal subgroup of $\pi_1(X,x_0)$.)
I was wondering if there's a more "direct" proof, or if I should just follow this proposition. Thanks in advance!
The CW-flavoured argument uses the relative version of CW approximation:
Let $X$ be a CW complex, and $\iota \colon X^n \to X$ the inclusion of its $n$-skeleton (we omit the subscript on $\iota$ for the sake of notation). We want to show that $\iota_*\colon \pi_1(X^2) \to \pi_1(X)$ is an isomorphism. Suppose $S^1$ is given a CW structure so that the basepoint is a $0$-cell.
If $f\colon S^1 \to X$ is basepoint preserving, then by relative CW approximation there is a basepoint preserving homotopy between $f$ and a pointed cellular function $\tilde{f}\colon S^1 \to X$. By cellularity the image of $\tilde{f}$ is in $X^1$, so $\iota_*\colon \pi_1(X^2)\to \pi_1(X)$ is surjective.
Now suppose $f\colon S^1 \to X^2$ is a pointed map such that $[\iota\circ f] = 0 \in \pi_1(X)$, i.e. $[f]$ is in the kernel of $\iota_*$. Without loss of generality we can assume that $f$ is a cellular map. If we consider any basepoint-preserving null-homotopy $H\colon S^1 \times I \to X$ of $\iota\circ f$, then by relative CW approximation (note that $H$ is cellular on the subcomplex $(X\times \{0\}) \cup (\{x_0\} \times I) \subset X \times I$) $H$ is homotopic to a basepoint-preserving null-homotopy $\tilde{H}$ of $\iota\circ f$ which is cellular. In particular the image of this null-homotopy is in $X^2$ so in fact $[f] = 0 \in \pi_1(X^2)$, therefore $\iota_*$ is injective.
Note: an essentially identical argument shows that $\pi_n(X) \cong \pi_n(X^{n+1})$ for all $n\geq 0$, as an exercise you should write out the details.
Edit: Further note: after looking at Hatcher's proof of this proposition, it seems more elementary than the full force of CW approximation, even though I feel like CW approximation is the "conceptual" way to answer your specific question about CW complexes.