Seeing value before color
Before you think about color, learn to see value: how light or dark something is. A painting with the right values and the wrong colors still reads as true. A painting with beautiful colors and muddled values never does.
Here's a simple exercise. Take a photo of a scene you want to paint and turn it black and white. Squint at it until the details disappear and only big shapes remain. Most scenes break down into three or four value groups: lights, a middle tone or two, and darks.
Now paint that scene with just black and white, using only those groups. It will feel too simple. That's the point. Once the value structure works, color becomes the easy part, because you know exactly how light or dark each color has to be.
Warm light, cool shadows
Light has a temperature, and so do shadows. On a sunny afternoon the light is warm, so the shadows lean cool and blue. Under a grey sky the light turns cool, and shadows often feel warmer by comparison.
When a painting looks flat, check the temperature before anything else. Push the light a little warmer and the shadows a little cooler, and the scene usually starts to glow.
Mixing a limited palette
You don't need thirty tubes of paint. A warm and a cool version of each primary, plus white, will mix almost anything you see.
Working with fewer colors also keeps a painting in harmony. Every mix shares the same few ingredients, so the colors naturally belong together.