Generating function approach.
You want the coefficient of $x^{24}$ in:
$$\begin{align}(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9)^{8} &= \left(\frac{1-x^{10}}{1-x}\right)^{8}\\
&=(1-x^{10})^8\sum_{k=0}^\infty\binom{k+7}{7}x^k
\end{align}$$
We can ignore the higher terms of $(1-x^{10})^8 = 1-8x^{10}+28x^{20}-\cdots$ because they do no contribute to $x^{24}$.
So you get: $$\binom{24+7}{7}-8\binom{14+7}{7}+28\binom{4+7}{7}$$
This can also be seen as an inclusion-exclusion result. $\binom{24+7}{7}$ is the number of ways of writing $24$ as the sum of eight non-negative integers. For each position, we subtract the $\binom{14+7}{7}$ solutions where that position is $10$ or greater. But then we've subtracted some of the sums twice, so we have to add back the cases where two of the values are $10$ or greater.