The biggest tip I can give you for playing chords by ear is to learn about "one four five" chord progressions (also written "1-4-5" or in Roman numerals "I-IV-V").
The challenge most musicians face when trying to figure out the chords to a song by ear is that they're listening and thinking that each chord could be any chord. With 24 major and minor chords alone, that’s overwhelming! It takes a lot of experimentation and guesswork on your instrument to find the chords that match correctly.
Fortunately, there’s a shortcut. By understanding a bit of the theory behind how chord progressions are built, you can immediately focus in on a small number of chords that are most likely.
The majority of songs in pop, rock, and other genres are based on a particular set of chords. These are the “one, four, five (and six)” chords in the key. You may have heard of three chord songs or four chord songs.
There are other chords in a key and songs can also use chords from outside the key (or be written in a minor key) but learning to recognise these most common progressions:
1. Lets you fully recognise the progression in a large number of songs, and
2. Gives you a strong basis for learning to recognise progressions which go beyond this too.
Depending on the key, the actual chords which are "one", "four" and "five" will vary (e.g. it could be C, F and G, or A, D and E) but once you understand the concept and you practice some chord progression ear training it becomes fast and easy to recognise the exact chords in a song by ear and play them on your instrument.