Let $(M,g)$ be a compact manifold of dimension $n\in\mathbb{N}$. Is there any formula (or is it possible) to find the order of the fundamental group, $\pi_1(M)$ using the metric of the manifold in general?
Or in other words, how can we conclude if a manifold is multiply-connected i.e. $\text {order}\left[\pi_1(M)\right] \ge 2$ (see this) using the metric $g$ in general?
I know there are some theorems regarding the properties of fundamental group of a Riemannian manifold, as stated in "Fundamental group and curvature", but I'm searching for any theorem regarding the direct relation between the order of $\pi_1(M)$ and the metric.
Context: As Gauss-Bonnet theorem connects the geometry and the Euler characteristic (a topological invariant) of a compact $2$-dimensional Riemannian manifold, likewise there should be an other theorem which will connect the order of the fundamental group (again a topological invariant) and the metric (geometry) of that manifold.