Rhythm = time arrangement. Melody = pitch sequence. Two independent dimensions.
Add rhythm to a poem, then sing it. Or change the rhythm of a melody.
This difference is the foundation of musical thinking.
A nursery rhyme rhythmized vs. sung.