(It's how I play that riff.)
Due to my "laziness," I place all my four (left hand fingers) on the A string and play the note D with my Pinky.
My left hand
Ring finger is, kind of, glued to the Pink finger.
View attachment 7230590
Now, I slightly move up my "two-finger" combination -
The Ring and the Pinky (kind of, "pivoting" on the Index finger on the note C (A string) and play the A note with the Pinky (while my Ring finger is "attached" to the Pinky.
My left hand Index finger is tightly muting the A string - no sound on that string while playing the note A on the E string.
And my resting/pivoting left hand Index finger is ready to play C, followed by the Middle finger playing C#.
My Right hand is "raking" those D and A notes.
For that purpose, I us my Ring finger.
View attachment 7230594