Yes, learning how things work- e.g. stacking thirds to get chords is vital. Instead of merely knowing THAT I, IV, and V are major triads, that ii, iii, and vi are minor triads and that vii is a diminished triad, if you instead learn HOW and WHY, then you'll always be able to figure out for yourself the WHAT.
Here's how I teach the stacked thirds. But YOU gotta do the work!
Write out the C major scale once (I'm serious, get a pencil and some paper and write it out- leave yourself plenty of room to write ABOVE it.
C D E F G A B C
Then write it again, only start with the third note (and no, it's NOT about modes!!!).
E F G A B C A B
C D E F G A B C
... and again....
G A B C D E F G
E F G A B C A B
C D E F G A B C
Those are the triads in the key of C. You took a note, went up two notes, and another two notes. Analyze those three-note chords and you'll see that the first, fourth, and fifth stacks are major chords (A major third with a minor third on top- as C to E is major and E to G is minor), that the second, third, and sixth stacks are minor triads, and the seventh one is a diminished triad.
Now to be complete (and I believe understanding the 7th chords is fundamental to understanding how basic harmony works!) add one more line with the next set of thirds...
B C D E F G A B
G A B C D E F G
E F G A B C A B
C D E F G A B C
Now you have C E G B stack- that's a major 7th. Same intervals for the one starting on F. But see how the fifth stack is different? Instead of being Major/minor/major thirds (e.g. C to E is major, E to G is minor, and G to B is major), it's a major/minor/minor- that minor third on top of the major triad changes the chord totally. That's the dominant 7 chord and its sound pulls your ear to something other than itself. It sounds unsettled and needs to resolve.
See how the second stack (D F A C) is a minor7? Same relationship between notes on the A stack (A C E G). Those are minor 7th chords- minor/major/minor as D to F is a minor third, F to A is major, and A to C is minor.
Now let's look at that seventh stack in there. It's different from any of the others because it's got a minor third (B to D), then ANOTHER minor third (D to F) and then a MAJOR third in F to A. That's why the 7th chord built on the seventh tone of the diatonic major scale is NOT a diminished chord. It's a minor 7 flat 5 (m7b5) or a half-diminished chord. A full diminished chord is all minor thirds so a Bdim is B D F Ab, not B D F A.
What you want to see to answer your original question, and as very clearly outlined by Malcom again, is that all the notes in those chords come from the C major scale.
John