Existence of closed, non self-intersecting geodesics on compact manifolds

We can easily find a simple closed geodesic if $M$ is not simply connected:

Proof: Let $\tilde M$ be the universal cover of $M$. Then one can pull back the metric to $\tilde M$, as $\pi : \tilde M \to M$ is a local diffeomorphism. Thus $\tilde M$ is also a Riemannian manifold and $\pi$ is an local isometry. As $M$ is compact, it's complete, and one can check that $\tilde M$ is also complete.

Fix $p \in M$ and let $\tilde p \in \pi^{-1}(p)$ be fixed. Define $$ C(p) = \min_{ q\in \pi^{-1}\ (p)\setminus \{\tilde p\} } d(\tilde p, q).$$

Note that $C(p) >0$ and is realized by some $q\in \pi^{-1}(p)$, as $\pi^{-1} (p)$ is a discrete set in $\tilde M$. One can check $C : M \to \mathbb R$ is continuous. Let $p_0 \in M$ be its minimum. Let $\tilde p \in \pi^{-1}(p)$ and $\tilde q \in \pi^{-1}(p) \setminus \{\tilde p\}$ such that $C(p) = d(\tilde p, \tilde q)$. Let $\eta : [0,d] \to \tilde M$ be a shortest geodesic joining $\tilde p$ and $\tilde q$. Such a geodesic exists as $\tilde M$ is complete. $\eta$ is obviously simple as it's length minimizing. Let $\gamma = \pi \circ \eta$. $\gamma$ is a simple geodesic loop ($\gamma(0) = \gamma(d)$), which might not be smooth at $p$.

However, consider $p_1 = \gamma (d/2) \in M$. As $C(p_1) \ge C(p)$, the same $\gamma$ is a curve which is the shortest curve along all curves homotopic to $\gamma$ with the same base point $p_1$. Thus $\gamma$ must be smooth at $p$ and so $\gamma$ is simple closed geodesic in $M$.

Remark When $M$ is simply connected, the general question seems to be an open problem. For $\mathbb S^2$, the answer is affirmative. I am no expert in this question so I think I cannot say more.