I will start with an example here:
assume we have 50 apples and 70 bananas to be divided between 10 people. How many ways can we do that ?
we count number of ways to distribute the apples between the 10 people, which is $59\choose50$
then we count the number of ways to distribute the bananas, which is $79\choose70$
and then the totalt is gives by using multiplication principle => $59\choose50$ * $79\choose70$
Example 2
Assume we have 4 boxes that contians red balls, green balls, blue balls and pink balls, how many ways can we choose 20 balls of these ? we get $23\choose20$ ways.
So my question is how do i know when to count the number of ways for each of the types and then use multiplication principle to get the total ? and when to just combine everything like in example 2 ?
For greater clarity, we shall take up Example 2 first.
Example 2
To put it into the standard stars-and-bars mould, invert the problem to putting identical balls into distinct (colored) boxes, $\to \binom{23}3 or \binom{23}{20}$ according to your preference. This is a single use of stars-and-bars
Example 1
Here the case is different. You are using stars-and-bars twice, for distributing two classes of identical items (apples, bananas), to distinct people, so the multiplication principle enters in.