
Generally, when playing two consecutive notes on the same fret but on different strings, two different left-hand fingers are used. In this example, the D ② with 4 is followed by 3 on C ⑤. This ensures a more musical connection (legato).
The other choice here—3 on D ②, could have been followed by 2 on C ⑤. Though this would be more labored, since 2 just played A ③.
The best option for fluid left-hand fingering is to circulate all four fingers and avoid repeating/overworking any one.