Sure - I had to ask the same question once.
To harmonize within any key, the chords are formed according to the following if starting with the root of the key: Major-Minor-Minor-Major-Dominant-Minor-Diminished. So, if playing in a C major key and starting with the Root, you’d play: C Maj-d min-e min-F Maj-G Dom-a min-B Diminished-back to C Maj. It’s sort of like playing a scale, but using the chords within that key signature.
This can be done in any of open chords, barre chords, triads, 7th triads, etc. Like I said also, it sounds good and can be played in various rhythm patterns, strumming, picking, etc. I feel like I am working on multiple skills at once.
Just to add - this is how you know what chords can “harmonize” within whatever song you’re playing. A song in the key of C Maj, for example, may ask for a d minor chord but not a D major chord. Your ear will tell you that the latter doesn’t sound right.