I'm not quite understanding the chord progression notations you wrote out.
Short anwer... The chords can be built up from the major scale. Stack thirds. You get triads, then seventh chords. Those chords work.
There is a general heirarchy of how chords work. They usually go back to I. V goes to I. V is a dominant chord -- Any type of dominant chord goes back to one, usually -- it could also go to vi as a deceptive cadence.
Generally goes follow these progression...
any predominant (ii, IV) dominant (V, viio) tonic (I)
And then there are "secondary" dominants -- Those just create a V I or viio I to a chord other than I. So in C Major, g#o would be viio/vi -- a dominant function to the sixth step of the C Major scale viio on the sixth step.
Generally chords form a progression and start somewhere, lead up to a domaninant chord, and that falls back to tonic -- which establishes the key or reinforces it. You can go wherever you want, but that tonal center (key) will get blurred if you move away too much.
How do you know what chords to use? That depends on the style. If it's blues, then more seventh chords (or extended chords too).
If you take the major scale and make triads over each step -- just stack thirds, note skip a note note skip a note note.
You end up with...
I Major triad
II minor triad
III minor triad
IV Major
V Major
VI minor
VII diminished triad
I Major
And then another third for sevenths...
I Major seventh chord
II minor
III minor
IV Major
V Dominant seventh chord
VI minor
VII half-diminished, or fully diminished (all minor 3rds)
I Major
Hope that helps.
Although you're not stuck with just those chords. You can temporarily go into another key. You can use chords that are outside of the key. Whatever you want. That's just a basic idea of how to explain these other chords that fit the key.
And then there's voicing -- how you arrange these notes. You asked how you know the right chord to use. If you use a chord in it's root position, it may sound better with a different voicing -- putting the third on the bottom, spreading the notes of the chord out instead of having them as close together.