Let $M$ be a compact manifold and $\varphi : M \longrightarrow M$ be a diffeomorphism which is isotopic to the identity. Does there exist a vector field $ X $ on $M$ such that $\varphi$ is the flow at time $1$ of $X$? If that is not always the case, where does the obstruction for such a $\varphi$ to be a flow lives in ?

The answer is no. In fact, there are diffeomorphisms arbitrarily close to the identity which are not contained in flows (which are also often called $1$parameter subgroups; here one is thinking of the set of vector fields on $M$ as a sort of "Lie algebra" for the diffeomorphism group). Here's an example which I learned about from Warning 1.6 of Milnor's paper "Remarks on infinitedimensional Lie groups" (which I highly recommend reading if you are interested in things like this). Regard $S^1$ as $\mathbb{R}/2\pi$. Fix some integer $n$ and some $\epsilon$ such that $0<\epsilon<1/n$. Define $$f : S^1 \longrightarrow S^1$$ $$f(x) = x + \pi/n + \epsilon \sin^2(n x).$$ Choosing $n$ large enough and $\epsilon$ small enough, we can make $f$ arbitrarly close to the identity in the $C^{\infty}$ topology. It is a fun exercise to show that $f$ does not lie in any $1$parameter subgroup of $\text{Diff}(S^1)$. It is not hard to generalize this kind of behavior to any manifold. I don't think there is any easy description of the obstruction here; it seems to be a delicate problem in dynamics. However, it is the case that every element of $\text{Diff}^0(M)$ can be written as a product of finitely many elements that are contained in $1$parameter subgroups. Indeed, the set of elements of $\text{Diff}^0(M)$ that are contained in $1$parameter subgroups generate a subgroup $\Gamma$ that is easily seen to be normal. But Thurston proved that $\text{Diff}^0(M)$ is simple for any compact manifold $M$, so we must have $\Gamma = \text{Diff}^0(M)$. For a discussion and proof of Thurston's theorem, I recommend Banyaga's book "The Structure of Classical Diffeomorphism Groups". 

