In order to assemble your dish of ice cream we take some number of scoops from the tub containing the first flavor, then some number of scoops of the next flavor, then some number of scoops of the third flavor, and so forth.
When we're finished, the total number of scoops must be $n.$
By analogy, we consider a product of polynomial series
$$ (1+x+x^2+\cdots)(1+x+x^2+\cdots)\cdots(1+x+x^2+\cdots)
$$
where there are $n$ copies of the series $1+x+x^2+\cdots$ each copy of the series corresponds to one of the tubs of ice cream. And we consider different terms of powers of $x$ that we can get by applying the distributive rule to this product until we have reduced it to a single polynomial series
$$ a_0 + a_1 x + a_2 x^2 + \cdots.$$
It should be clear that there's only one way to get the term $1,$
namely, we have to multiply the $1$ in the first term by the $1$ in the second term, and so forth. So the constant coefficient in the product is
$a_0 = 1.$
The analogy to a dish of ice cream is that the dish is empty, and there's only one way to do this.
To get the term $x,$ we can multiply the $x$ in any of the terms with the $1$ in every other term. There are $n$ ways to choose which copy of the series to take the $x$ from, and there's no other way to get $x,$ so the coefficient of $x$ in the product is $a_ 1 = n.$
The analogy to a dish of ice cream is that we take one scoop from one of the tubs and none from the others.
For $x^2,$ we can take $x^2$ from one copy of the series and $1$ from all the others, or we can take $x$ from each of two copies and $1$ from all the others, and that's all we can do.
The analogy to a dish of ice cream is that we take two scoops--maybe the same flavor, maybe two different flavors.
The idea is that a power of $x$ corresponds to a number of scoops of ice cream: $x^k$ corresponds to $k$ scoops.
We can keep going like this for any number of scoops. For $k$ scoops we look at how many ways $x^k$ can occur from the application of the distributive rule, and it turns out to be the number of ways we can take some number of scoops from the the first tub (some power of $x$ from the first copy of the series), some number of scoops from the second, and so forth, and in the end the number of scoops adds up to $k$
(that is, when we multiply the chosen powers of $x$ we get $x^k$).
That's why we say the number of ways to make a dish of $n$ scoops of ice cream is the coefficient of $x^n$ in the expansion of
$$ (1+x+x^2+\cdots)(1+x+x^2+\cdots)\cdots(1+x+x^2+\cdots).$$
But in order to simplify the answer, we count the number of tubs,
and for $n$ tubs we find that
$$ (1+x+x^2+\cdots)(1+x+x^2+\cdots)\cdots(1+x+x^2+\cdots) = (1+x+x^2+\cdots)^n.$$
And then we use the fact that
$$1+x+x^2+\cdots = \frac{1}{1 - x} = (1 - x)^{-1},$$
so
$$(1+x+x^2+\cdots)^n = (1 - x)^{-n},$$
and use the binomial theorem to write out the expansion of this power of the binomial $1 - x.$
Generalizing the problem slightly,
if we wanted to count the number of ways to select $p$ scoops from a choice of $q$ different flavors, where $p$ and $q$ could be different,
we would be looking for the coefficient of $x^p$ (power = number of scoops)
in the binomial expansion of $(1−x)^{−q}$ (power = negative number of flavors).