As $M$ is compact and smooth, there exists a finite triangulation $T$ of $M$. The de Rham Theorem now tells you now that the de Rham cohomology of differential forms is isomorphic to the real simplicial cohomology on $M$ induced by $T$. Denote by $C^*_T(M,\mathbb R)$ the corresponding real simplicial cochain complex.
For a fixed (oriented) $d$-simplex $\omega$ of $T$, consider the associated dual cochain $\alpha \in C_T^d(M,\mathbb R)$ that evaluates to $1$ at $\omega$ and to $0$ at every other $d$-simplex. As $C_T^d(M,\mathbb R)$ is generated by the collection of all such dual cochains, showing that $\alpha$ is a coboundary will suffice to prove that $H^d(M) = 0$.
As $M$ can WLoG assumed to be path-connected, we can choose a sequence $\omega = \omega_1,\omega_2,\omega_3,\dots,\omega_n$ of distinct wandering oriented $d$ simplices, such that for $k=1,\dots,n$, $\omega_k$ doesn't share a face with any other member of this sequence other than with $\omega_{k-1}$ and $\omega_{k+1}$, such that two consecutive members $\omega_k$ and $\omega_{k+1}$ have precisley one d-1 face $\sigma_k$ in common, and such that $\omega_n$ has a face $\sigma_n$ lying in $\partial M \neq \emptyset$.
Define a cochain $\beta \in C^{d-1}_T(M,\mathbb R)$ by assigning the value $\pm 1$ to the (oriented) simplicies $\sigma_k$ for $k=1,\dots,n$ and $0$ to any other $d-1$ simplex. By choosing the right signs each time, one can guarantee that $\delta \beta (\omega_k) = 0$ for every $k \geq 2$ and $\delta \beta(\omega) = \delta \beta (\omega_1) = 1$. Moreover, from the definition of $\beta$ and the choice of our sequence $\omega_1,\dots,\omega_n$, we see that $\delta \beta = 0$ on any $d$-simplex other than $\omega$. Thus, $\delta \beta = \alpha$, so $\alpha$ indeed is a coboundary.