Here is another obstruction.
Suppose $M^n$ is a closed simply connected manifold which admits only trivial vector bundles. Then $M$ cannot be a $\mathbb{Z}/2\mathbb{Z}$-homology sphere, unless $n=3$.
I'm not sure if the hypothesis that $M$ is simply connected is necessary, but it's certainly necessary in the proof.
Together with the end of Michael Albanese's answer, this implies that every simply connected $5$-manifold admits a non-trivial vector bundle.
Proof Sketch: By the work in the other answers, we already know that if $M$ admits only trivial vector bundles, then $M$ is odd dimensional, orientable, and it has the rational homology of a sphere. Thus, we may assume $n\geq 5$.
Now, assume for a contradiction that all the torsion in $H^\ast(M)$ is of odd order. Let $k$ denote the least common multiple of the orders of the torsion and note that $k$ is odd.
Because $M$ is orientable, it has a degree $1$ map $f:M\rightarrow S^n$. We will construct a non-trivial vector bundle on $M$ by pulling back a non-trivial bundle $E$ over $S^n$ along $f$. When $n\neq 7$, we may use the tangent bundle $E=TS^n$. When $n=7$, we let $E$ denote the rank $3$ vector bundle corresponding to a generator of $\pi_7(BO(3))\cong \pi_6(O(3)) = \pi_6(S^3) = \mathbb{Z}/12\mathbb{Z}$. Let $\phi:S^n\rightarrow BO(s)$ denote the classifying map of the bundle $E$ (where $s = n$ isif $n\neq 7$, and $s= 3$ when $n = 7$.)
We claim that $f^\ast E$ is a non-trivial vector bundle over $M$. To see this, note that since $M$ is simply connected and all torsion is annihilated by $k$, there is a map $g:S^n\rightarrow E$ of degree $k^r$ for some integer $r\geq 1$. (See the answer here for a proof.)
It is enough to show that $g^\ast(f^\ast E)$ is a non-trivial vector bundle over $S^n$. Of course, it is enough to show that the map $\phi\circ g\circ f:S^n\rightarrow BO(s)$ is homotopically non-trivial. We'll show this by showing the induced map on $\pi_n$ is non-trivial.
So, consider the induced map on $\pi_n$. For $n\geq 5$ odd (except $n=7$), Kervaire has shown that $\pi_n(BO(n))\cong \pi_{n-1}(O(n))$ is either $\mathbb{Z}/2\mathbb{Z}$ or $(\mathbb{Z}/2\mathbb{Z})^2$. When $n\geq 7$$n\neq 7$, the fact that $E$ is non-trivial implies that $\phi_\ast$ is non-trivial, so, for $n\geq 7$$n\neq 7$, the kernel of the map $\phi_\ast:\pi_n(S^n)\rightarrow \pi_n(BO(n))$ is the even integers. On the other hand, by our choice of $E$ when $n=7$, we have $\ker \phi_\ast = 12\mathbb{Z}$. In either case, the image of $(g\circ f)_\ast:\pi_n(S^n)\rightarrow \pi_n(S^n)$ is multiplication by the odd number $k^r$, so not contained in $\ker \phi_\ast$. The completes the sketch. $\square$.