This is how pretty much everyone plays the D Chord.
Closed Hand / Open Hand
Conventionally speaking, we only strum the D chord from the D string down (emitting the low E and A strings). But you can also hit and play the A string if you want – it’ll sound fine. Don’t hit the low E string though because it will sound wrong. If you’re using a Closed Hand position, use your thumb to mute the low E string. If you’re using an Open Hand position, you need to be more careful with your strumming to make sure you don’t that pesky low E string.
The trickiest thing with this chord is getting fret 2 on the hi E string ringing out. It’s tricky because the underside of finger 3 tends to mute it. It’s especially tricky for people with chunkier fingers because the tips of the fingers are bigger. Getting finger 3 stretched over enough can also be tricky for some people.
As with all things on the guitar, you have to experiment with what works best for you. Play around with the angle and the curl of the fingers. Play around with Open and Closed Hand positions. And especially play around with what part of the fingertip you press down with. If you’re finding it hard to get this note ringing out, pressing down with the bottom part of the fingertip really helps.