It takes planning and thinking ahead. In general, you want to paint darker colors on top of lighter colors. The quick and dirty solution would be to spray a figure with white primer, and then paint everything on top of that. But that can have some downsides. Maybe you don’t want a thick layer of primer interfering with joints. Or some colors on the figure are fine as is and don’t require repainting? That’s when you have to plan and think.
I rarely apply a solid base of white, as described above. Instead, I’ll apply a “primer” coat of Testor’s Dullcote. This will apply some slight texture to the figure, giving the acrylics something to “latch” onto. (Lots of folks paint without primer of any kind, but I find that water-based paints such as acrylics tend to slide around uncoated plastic, much like water off a duck. Best to give the paint something to bite into.)
If you’re applying a dark color over a lighter color, such as black on yellow, you shouldn’t have too much trouble. But what if you’re applying yellow to… anything? Or even a dark but fairly transparent pigment like red or green? Here’s my trick: I will apply a first coat of “rosy beige” first. (Used to be called “Flesh,” but that is clearly a problematic name at best.) I use the Ceramcoat version, but there are other brands using different names. This tends to be fairly light in tone while still being somewhat opaque. Your yellow/red/green will be much easier to paint on top of this.
I also paint in thin coats. Don’t just glop the stuff on there! Even on top of “rosy beige” a yellow or translucent green can take three or four coats. I usually thin the acrylics with a drop or two of water on my brush. Thin coats might mean you have to apply more coats, but the smooth finish is worth the effort.