There are a few different ways of doing it (as always when it comes to music).
First of all, the thing to understand is the structure of chords. Basically the two main categories of chords are either major or minor. And then other chords can be created from the basic major/minor chord by adding more notes, or sometimes raising or lowering the fifths.
I think of the major/minor chords as the basic building blocks of music. And then all the other chords are made from those building blocks with added decorations/frills/sprinkles/whatever.
The simplest version for how to play chords is to strip the chords down to their most basic form and stick exclusively to major and minor chords.
The next version is of course to include sevenths and diminished chords.
After that, the simplest solution for any additional notes (like the 4th in a sus4 chord or the 9th in an add9),is to add them in the right hand. So you could have them as harmonies below the melody line. Or you could play the full chords in the right hand while accompanying another instrument or yourself singing.
It's also good to practice playing slash-chords (e.g. a walking bass line like C, C/Bb, C/A, C/G) and get used to the stretches you have to do. I thought
If you want to get really fancy, you could play combination chords like these:
Cm9 by using the C bass note, Cm+Gm chord buttons together,
Cmaj7(9) = C bass note, and C+G chord buttons together
Cm6 = C bass note, Cm + Cdim together
C7(b9) = C bass note, C + Bbdim
....to mention a few options. It's fun to do every now and then, but sometimes it's nice to not have super fancy arrangements too.
The best way to learn these things (IMHO) is to play other people's arrangements. Arrigo Tomasi has a bunch or really jazzy arrangements, if that's what you're in to and I learned a lot of fancy chords by playing his stuff (tons of free sheet music here:
https://www.arrigotomasi.com/eng/accord ... /index.asp)
I also learned a lot of technique and chord stretches from the higher level Palmer-Hughes books. And then the trick is to take these new chords and stretches and sprinkle them into your own accordion arrangements as added spice.