In https://hebey.u-cergy.fr/NotesSharpSP.pdf right at the beginning Hebey says
Given $(M,g)$ a smooth compact $n$-dimensional Riemannian manifold, one easily defines the Sobolev spaces $H^p_k(M)$, following what is done in the more traditionnal Euclidean context. For instance, when $k = 1$, and $p = 2$, one may define the Sobolev space $H^1_2(M)$ as follows: for $u \in C^{\infty}(M)$, we let $$\Vert u \Vert^2_{H^1_2(M)}=\Vert u \Vert^2_2+\Vert \nabla u \Vert_2^2$$ where $\Vert \cdot \Vert_p$ is the $L^p$-norm with respect to the Riemannian measure $dv(g)$. We then define $H^1_2(M)$ as the completion of $C^{\infty}(M)$ with respect to $\Vert \cdot \Vert_{H^1_2(M)}$ .
How does he define it so "easily" while I see other sources where they use things such as partition of the unity to define Sobolev spaces on manifolds etc? Also, what might go wrong if we don't require $M$ to be compact?
In order to make this definition workable, one has to show the elements in your Sobolev space (which a priori are equivalence classes of Cauchy sequences of functions) can be identified with their limit in $L^p$. This corresponds to proving if a sequence $\{u_i\} \subset C^\infty(M)$ is Cauchy with respect to the norm $\lVert \cdot \rVert_{H_k^p}$ and converges to $0$ in $L^p$, then it converges to $0$ in $\lVert \cdot \rVert_{H_k^p}$. This is treated just after Definition 2.1 in "Sobolev Spaces on Manifolds" by Hebey and Robert. This where one needs to deal with the functions locally.