When you’re first starting out I’d just stick to playing the G pentatonic scale over all the chords.
As you get more comfortable. You can start switching between scales as the chord changes.
More importantly would be highlighting the chord tones of each chord regardless of what scale you’re playing. So for a G, C D progression you’d have (G,B,D) (C,E,G) and (D, F#, A).
Playing the chord tones as the chords change will help spell out the changes and add another depth to your soloing.