The idea behind the four chords
These chords work well together because of its progression. They all use notes from the same major scale – in this case, G major.
Here’s a handy trick: if you write out any major scale, you can play major chords starting on the 1st, 4th, and 5th notes, and a minor chord starting on the 6th note. These four chords will always sound great together, just add some strumming and you’ve got a hit song!
For example: If we take G as the starting note and then go up five whole notes, we get a D. E is six notes up and C is four notes up.

This circle of fifths is useful to see the fifth note of each key’s scale. For C, the fifth note is G. For G, the fifth note is D – and so on.