Build a melody from the notes inside a chord.
You know what chords are made of. Now we're going to use that knowledge to write melodies.
The constraint here is a useful one: for each chord, you'll write a short melodic figure using only the notes in that chord. Root, third, fifth — that's your palette for that moment. When the chord changes, your available notes change with it. The melody follows the harmony.
This might feel awkward at first. Good. That awkwardness is information — it means you're actually thinking about which notes you're choosing and why. Work through it. The result should be a melody that sounds genuinely connected to the chords underneath it, because it literally is.