if $f:X\to Y$ is continuous and injective, then $\pi_n(f(X))=f_*(\pi_n(X))$

No, you can bend an open line $—$ into a figure eight $∞$ in a bijective and continuous way, so $f(—) = ∞$, but $π_1(—) = 1$, whereas $π_1(∞) ≠ 1$. See the figure at wiki/Immersed Submanifolds:

enter image description here


For an easy and general type of counterexample, take an arbitrary topological space $Y$ with $\pi_n(Y) \neq 0$ (for example $Y = S^n$, the $n$-sphere), and take $X$ to be the discrete topology on the underlying set of $Y$ (or said differently, $X$ is disjoint union of the points of $Y$). Then the identity map $X \to Y$ is bijective and continuous, but $\pi_n(X) = 0$.

Conversely, one can take $X$ arbitrary and let $Y$ be the indiscrete (i.e. trivial) topology on the same set. Again the identity map $X \to Y$ is continuous and bijective, but this time $\pi_n(Y) = 0$ independent of the choice of $X$.

This shows that, without further conditions, we shouldn't expect there to be any relationship in general between $\pi_n(X)$ and $\pi_n(Y)$ given a continuous bijection $X \to Y$.