Chords come from the scale
Chords in a key are built by stacking notes inside the scale. In a major key, the triad pattern is major, minor, minor, major, major, minor, diminished — giving you I, ii, iii, IV, V, vi, and vii°.
Learn this pattern once and you instantly know the chords in every major key.