D7 is often the first seventh chord that one learns when starting to play guitar chords. In my children’s guitar method book I introduce the D7 even earlier than D major triad. I do it because very often the D7 is preceded by C major and then it is possible to leave the first finger on 2nd string and make the chord shifting easier.
Make sure you do not strum more than four strings! If you play the fifth string then the result is D7/A (second inversion of the chord). If you strike all six strings then we can sure name it but it will not make any sense 🙂
Most often the G major follows and then you can slide your third finger from 2nd to 3rd fret and you’re done.
Now go and practice this chord with automated feedback at strumprofessor.com to make sure it sounds right. If you cannot wait until the C7 comes, you can build a custom level where you put exactly the chords that you want to practice.