This isn't really an answer, the other answers give the basic analysis of the chords in your example. But I think you need to look into harmonic analysis and harmonic reduction. You may be trying to identify chords on too small a time scale - like every beat of even every eight note - but that is not always appropriate. Some related terms to read up on are harmonic rhythm, figuration, diminution, non-chord tones.
A harmonic analysis could look like the following where a simplified version of the music is given below the original score...

That is from https://en.wikipedia.org/wiki/Voice_leading
The arrows in that reduction may seem confusing, but they are trying to show something called a voice exchange. You can ignore them if it isn't clear.
Also, you can think of levels of harmonic action which distinguishes between top level, melodic particulars versus deeper, more abstracted harmonic design, like in this example from the textbook Kostka, Tonal Harmony...

From comments...
f a chord in A minor has tones B-D-F-G#, then can it be both iio7 (G# as 7th) and viio chord?
No. You want to read chords in thirds, identify chord roots, then identify inversions.
B-D-F-G#
if you read that in thirds it will be G# B D F
, so G#
is the root and the chord is in first inversion from the B
in bass. In Roman numeral analysis (RNA) that is Am: viio6/5
.
For the diminished chord iio
in minor, the basic triad is B D F
. It is often in first inversion D F B
, D
in bass, RNA iio6
.
When you get to that chord as a seventh chord things get a little tricky. The ii
chord in major and the iio
chord in minor are both subdominant function chords, they are not dominant chords. That has bearing on the seventh chord in minor.
The seventh chord spelling in A
minor is B D F A
. Notice the seventh above root B
is an A
. It's a base diminished triad plus a minor seventh. That chord is called a half diminished chord. The RNA symbol uses a slashed circle: iiø7
. This is the seventh chord on root ii
in minor. It often is in first inversion D F A B
, iiø6/5
.
You can lower the top tone of B D F A
by a half step to B D F G#
, but notice that in the key of A
minor that change from A
to G#
is a move from tonic to leading tone
scale degrees. That leading tone is what creates the dominant function viio6/5
.
One half step may seem like a tiny change, but it's an important change. It's the difference between a subdominant function iiø7
chord and a dominant function viio7
chord!
If all this stuff about roots, inversions, function, etc. is not familiar, you probably need to get a good harmony textbook to learn the fundamentals of harmony.