Dsus2 C G thore are your chords?
If I were you I'll go for this progression Dsus2 C G Am it is like a subdominant circle (Talking about functions)
Just work with that progresion a while. Also at some point you can make it more tonal like using the circle of fifths.
In some instance Instead of a Am play a E and then you go to an A and use that to go to a Dm finally resolving that sus2 that you were playing. And then you can go to a G and resolve it to a C and make it in C major, or even minor if you want too modulate but, C minor is a bit difficult on the guitar xd. (Just some circle of fiths.
I recomend you to make some melody not just arpeggios, that would be boring, making the melody is up to you.
If you want to learn to compose the basic thing is knowing harmony, you can start with tonal harmony, tonal harmony is the one based on the circle of fifths.
Composing is 20% knowledge, 10% Creativity and 70% practice. You need to practice a LOT to learn to compose.