Is D major as an open chord an inversion as the 5th A is the next note to be played?
Inversions can be difficult on a guitar because of limited fingering options, they do my head in a bit if I’m honest but I don’t really have a need to care about them personally.
The open D chord is not an inversion, it’s just a set of notes that make up the D triad, with the D in the root, i.e., the lowest note.
Inversions take the lowest note and move it up an octave. The notes in a D major triad are D, F#, A.
To make the first inversion we’d take the D and put it at the top, giving us F#, A, D.
Second inversion would do the same again and move the F# to the top, giving us A, D, F#.
If you play an open D chord but mute the D on the fourth string then you’d have a D triad second inversion (just play the top three strings of the chord).
Any other order of the notes would just be playing it with a different root – for example if you play the open D chord and also play the A on the fifth string then this would just be D/A (D over A).
It can get even more difficult on a guitar with extended chords using more than three notes, again because of fingering constraints. It’s been so long since I’ve studied them I would need to revise them a bit, but like I say, I don’t really have much need to know about them – I’ll often call something an inversion even when it isn’t, I think many guitarists are guilty of it.