$4$-manifold with fundamental group $\Bbb Z/4\Bbb Z$

As pointed out, every finitely presented group arises as the fundamental group of a closed smooth orientable four-manifold.

The same is not true of non-orientable manifolds as $\mathbb{Z}/3\mathbb{Z}$ illustrates. A necessary condition is that the group must have an index two subgroup (i.e. the fundamental group of the orientable double cover). This turns out to be sufficient. That is, a finitely presented group is the fundamental group of a closed smooth non-orientable four-manifold if and only if it has an index two subgroup; see this question.


A non-orientable example: consider the automorphism $f : S^2 \times S^2$ given by $(x, y) \mapsto (y, -x)$ where $-$ denotes the antipode map. This map has order $4$ and gives a free action of $\mathbb{Z}/4$ on $S^2 \times S^2$, so its quotient is a closed $4$-manifold $X$ with $\pi_1(X) \cong \mathbb{Z}/4$. Since $\chi(S^2 \times S^2) = 4$ we have $\chi(X) = 1$ so $X$ is non-orientable; alternatively, we can check that $f$ acts by $-1$ on $H^4(S^2 \times S^2)$.