Another class of examples comes from group cohomology: if $G$ is any group with interesting higher cohomology $H^n(G, A), n \ge 2$ then there are non-nullhomotopic maps $BG \to B^n A$ for some $n \ge 2$. But the source and target don't have nonzero homotopy groups in any shared degree so any such map induces the zero map on homotopy groups. If these cohomology groups all vanished then, among other things, groups would have no nontrivial central extensions and so all finite $p$-groups would be elementary abelian!

(**Edit:** admittedly, the above examples don't usually involve finite complexes. But with the right $G$ we can take $BG$ to be an aspherical manifold and then we can truncate $B^n A$.)

This is the precise analog, in topology, of the fact in homological algebra that in most interesting abelian categories $\text{Ext}^i$ can be nontrivial for $i \ge 1$, which reflects the existence of maps in derived categories between two objects which don't have nonzero homology groups in any shared degree.

Group cohomology turns out to be a pretty good model for the more general question:

What is a complete set of obstructions for a map $f : X \to Y$ (let's say pointed, between pointed CW complexes) to be nullhomotopic?

There is an obstruction theory coming from trying to lift $f$ up through the stages of the Whitehead tower

$$\dots \to Y_2 \to Y_1 \to Y_0 \cong Y$$

of $Y$. Here $Y_k$ is the $(k-1)$-connected cover of $Y$, obtained from $Y$ by killing $\pi_1, \pi_2, \dots \pi_{k-1}$ (so the index tells you the lowest degree in which it can have a nontrivial homotopy group). In particular $Y_1$ is the connected component of the basepoint and $Y_2$ is the universal cover.

At each stage, suppose we've lifted $f$ to a map $f_n : X \to Y_n$. Now, $Y_n$ has lowest homotopy group $\pi_n(Y_n) \cong \pi_n(Y)$, and hence there is a natural map

$$k_n : Y_n \to B^n \pi_n(Y)$$

inducing an isomorphism on $\pi_n$. The pullback of this map along $f_n$ gives a cohomology class

$$k_n \in H^n(X, \pi_n(Y))$$

which I'll also call $k_n$, and $f_n$ lifts to a map $f_{n+1} : X \to Y_{n+1}$ iff this cohomology class vanishes. (In general, $k_n$ is only well-defined once we've chosen a lift $f_n$.) The punchline now is that $f$ is nullhomotopic iff all lifts $f_n$ exist iff all classes $k_n$ vanish. If $X$ has finite cohomological dimension then this is in principle only finitely many conditions to check.

*Example.* Let $Y = BO$ be the classifying space of stable real vector bundles, let $X$ be a smooth manifold, and let $f : X \to BO$ be the classifying map of the stable tangent bundle. Then $f$ is nullhomotopic iff $X$ is stably parallelizable. The characteristic classes $k_n$ are Bott periodic. Here are the first few:

$k_1$ is the first Stiefel-Whitney class $w_1$. It vanishes iff $f$ lifts to a map $f_2 : X \to BSO$ iff $X$ is orientable. Here $BSO$ is $Y_2$.

$k_2$ is the second Stiefel-Whitney class $w_2$. It vanishes iff $f_2$ lifts to a map $f_3 : X \to BSpin$ iff $X$ has a spin structure. Here $BSpin$ is $Y_3 \cong Y_4$.

$k_3$ automatically vanishes. $k_4$ is the first fractional Pontryagin class $\frac{p_1}{2}$. It vanishes iff $f_3$ lifts to a map $f_5 : X \to BString$ iff $X$ has a string structure. Here $BString$ is $Y_5 \cong Y_6 \cong Y_7$.