This is not true in general. Let $X$ be a discrete infinite set and $f:X\to \{0\}$ be constant. Then $f$ is a local homeomorphism, is closed, and $f^{-1}(0)$ is infinite.
Theorem. If $f:X\to Y$ is a local homeomorphism, $X$ a separable metric space with no isolated points, $Y$ be Hausdorff and first countable, and $y$ is such that $f^{-1}(y)$ is infinite, then $f$ is not closed.
Proof: First notice that $f^{-1}(y)$ is discrete since if $x_n\in f^{-1}(y)$ converges to $x\in f^{-1}(y)$, then taking open $U$ such that $f\restriction_U$ is a homeomorphism, we'd have $x_n\in U$ for large enough $n$. But this would imply $x_n = x$ for large enough $n$ since $f$ is injective on $U$ and $f(x) = f(x_n)$. Since $X$ is a separable metric space, it has countable spread i.e. any discrete subset of $X$ needs to be at most countable. Thus we can write $f^{-1}(y) = \{x_n : n\in\mathbb{N}\}$ where $x_n$ are distinct. Pick some $r_n > 0$ such that $B(x_n, r_n)$ are pairwise disjoint (this can be done by induction for example) and restriction of $f$ to those balls is a homeomorphism. Then pick some $z_n\in (B(x_n, r_n)\cap f^{-1}[U_n])\setminus \{x_n\}$ where $U_n$ is a local basis of $y$ to ensure that $f(z_n)\to y$ (this works because there's no isolated points in $X$) and $Z = \{z_n : n\in\mathbb{N}\}$. If $z\in\overline{Z}\setminus Z$, there is a subsequence $z_{n_k}$ convering to $z$. Then $f(z) = y$ thus $z = x_m$ for some $m$. But this is impossible as then $z_{n_k}\in B(x_m, r_m)\cap B(x_{n_k}, r_{n_k})$ for large enough $k$, but those balls were assumed to be disjoint. Thus $Z$ is closed. But $y\in \overline{f[Z]}\setminus f[Z]$ so $f[Z]$ is not closed. $\square$