This is a comment that is meant to show that one should not look for such Riemannian manifolds among negatively curved ones. Indeed, let $\Sigma$ be a compact surface with a metric of negative curvature. Then for any point $p$ there is a geodesic $\gamma: [0,\infty)$ such that $\lim \inf_{t\to \infty}(p,\gamma(t))>0$.
Proof. Take any simple closed geodesic $\eta$ on $\Sigma$ that doesn't contain $p$. Parametrise $\eta$ by $S^1=\mathbb R/\mathbb Z$. Consider a geodesic segment $\gamma_s$ that joins $p$ with a point $\eta(s)$ and let $s\to \infty$. You will be able to vary $\gamma_s$ continuously changing $s$ continuously (because curvature is negative). Then segments $\gamma_s$ will converge in the limit to a geodesic ray that accumulates to $\eta$.
This construction generalises to any dimension.
One might wonder about positive curvature. Of course, if we take a round sphere, this is a good example, all trajectories are periodic. However, I am not quite sure if a generic $2$-sphere of positive curvature has the property you are asking for. Here a toy model are billiards (https://en.wikipedia.org/wiki/Dynamical_billiards) in convex domains in $\mathbb R^2$. This is a heavily studied subject. However, if one takes the second simplest billiard - an ellipse, then the property you are looking for doesn't hold for a subset of trajectories of codimension $1$. Namely, if you take a trajectory that passes through a focus and continue it to infinity, it will converge to the large axes of the ellipse. For all other trajectories, that don't pass through a focus indeed, there is recurrence - they come back to $p$ as close as you want.