A Dsus4 chord contains the notes D, A, G. It is built from the suspended 4th formula 1 - 4 - 5, with D as the root.
What is the difference between D and Dsus4?
Dsus4 replaces D major's third (F♯) with the fourth (G). That one note removes the chord's major/minor identity and leaves it sounding suspended and unfinished — which is exactly why alternating D and Dsus4 sounds so satisfying: the ear hears the tension resolve back home.