Number of combinations of 12 donuts with 8 choices of flavor with restrictions (at least and at most)

Your answer to the first part is correct.

To answer the second part, assume that vanilla and strawberry are two of the eight flavors, and the other six flavors are distinct from these and from each other. Moreover, assume without loss of generality that the first grouping of stars corresponds to the vanilla flavor and the second grouping of stars is the strawberry.

Then the placement of the first bar must be among the first three symbols overall: that is to say, we can have $$(\; | \ldots), \quad (\, * \, | \ldots), \quad (\, * * | \ldots).$$ The placement of the second bar must be after at least three stars are placed after the first bar. So the possible arrangements are now $$(\; | * * * \ldots), \quad (\, * \, | * * * \ldots), \quad (\, * * | * * * \ldots).$$ There are no other restrictions: in each of the above three cases, any placement of stars and bars following the symbols is allowed so long as the correct remaining numbers of stars and bars are used. In the first case, there are $6$ bars and $9$ stars remaining, so there are $\binom{15}{6} = 5005$ such arrangements. In the second, there are $6$ bars and $8$ stars remaining, with $\binom{14}{6} = 3003$ arrangements. And in the third, there are $6$ bars and $7$ stars remaining, with $\binom{13}{6} = 1716$ arrangements, for a total of $9724$ desired arrangements satisfying the given criteria.

Why did your method of solution not work? Ultimately, the reason is that you cannot perform the enumeration separately for the individual flavors because they don't occur independently. The stars represent donuts, and the bars represent divisions between donuts of different flavors.