In a totally pragmatic way of answering, I would say: avoid yellow.
Because by default, a yellow color is not accessible on white background because of its lack of contrast. See by yourself here:
The only way to pass the minimal requirement for the contrast is to pick a brownish color. I'm sure your don't want that.
Another aspect is the visual aspect of your stars and the context around it: it has to be clear that it invites to rate OR it is a displayed score (input state), that the empty state cannot be mistaken by another styling, or the information isn't conveyed only by the color (accessibility). Displaying stars alone won't help.
Here is an illustration of what I meant.
To answer your very question, you see that color doesn't really matter here, I would go for the accent color of your Design System or Brand Guideline to keep consistency. Keeping in mind accessibility and usability of course :)
Have a great day!