Let us take the example of $k=8,n=63$, and see what we can do
Method I, generating functions
Each time, we generate $0\;thru\;9$ Let us write it as $(x^0 + x^1+ x^2 + .... +x^9)$
Then $(x^0 + x^1+ x^2 + .... +x^9)^8$ represents generating such numbers $8$ times,
and the coefficient of $x^{63}$ when we multiply it out will give the answer, $11,440$
Method II, stars and bars with inclusion-exclusion
We use the stars and bars method, and exclude "bad" results by deliberately allowing $10$ in one or more of the $8$ slots. Here it would lead to
$\binom{70}7 - \binom81\binom{60}7 + \binom82\binom{50}7 - \binom83\binom{40}7 + \binom84\binom{30}7 - \binom85\binom{20}7 +\binom86\binom{10}7 = 11,440$
Method III, stars and bars, attempting to eliminate inclusion-exclusion
Assume you have placed the maximum $9$ in each slot, (thus $72$ for $8$ slots),
now take out $72-63 = 9$ units, applying stars and bars.
We get $\binom{9+8-1}{8-1} = \binom{16}{7} = 11,440$
We may not be totally successful in eliminating inclusion-exclusion, e.g. in your example with $k = 8, n = 62$, we would have to use it on a minor scale, $\binom{17}7 - \binom81\binom77 = 19,440$