I can not give any hint how to learn "earing" chords. This comes with experience and feeling, sometimes faster, sometimes slower, maybe also sometimes never.
When my own "earing" fails, I use the following method:
STEP 1: I know the sequence (if you don't, learn it by heart):
F C G D A E B
d a e b f# ? ?
Knowing these chords is enough for me. (Got a capo.) For better alignment I used the german way of naming the chords where lowercase letters mean minor chords ( e.g. C=C, a=Am). For any tone in a song that is completely in a major key you need three adjacent chords in the upper line above where the one in the middle names the key the song is in. (Example: For a song in G (one sharp) you need C(IV), G(I) and D(V), nothing else. For a song in Em (also one sharp) you need the corresponding chords in the lower line, Am(IV), Em(I) and Bmin(V). Compri?) Every step in the lines above means adding a sharp or omitting a flat at the beginning of the line (F or Dm one flat, C or Am nothing at all, G or Em one sharp, D or Bm two sharps ...)
Now every song that does not contain any sharps or flats except those at the beginning of the line which define the key can only need a maximum of six different chords. If I see one sharp at the beginning of the line this song is either in G or Em (so-called 'parallel keys' in german) OR BOTH, and these six chords can be C, G, D, Am, Em, Bm: the key(s) in question in the middle and the two adjacent ones (of each).
STEP 2: If any tone of the melody doesn't match the chord I'm playing (not in reverse!) I have to choose one from those six chords that contains that tone.
So if the key is G or Em (one sharp) and the tone in question is e.g. an E it can be accompanied by a C(C,E,G) or an Em (E,G,B) or an Am(A,C,E).
STEP 3: I use my ear (and heart) to choose one of these possibilities by "try and error". Still no hint how to learn hearing (and feeling).
That covers about 95 to 98 percent of the songs I know and like. For the rest (containing in-line sharps or flats) it's almost always one of the chords adjacent to the six which are determined by the key (step 1) and this chord also must contain the sharped or flatted tone in question.
Of course this method only works if HARMONIES are required. If not, you may really need some Xmin7sus5dim+/- or whatever trash was also invented. I don't - simply because I (normally) don't like songs of that kind.
To be fair I should mention that there are still exceptions I like, e.g. "Time In A Bottle" by Jim Croche. AND: There are always several (=many) possibilities to apply that method - CHARMING and BORING ones - that's where art begins...
Hope that helps a little.