Think about creating tension and then relieving it.
Tension in music is created by the unexpected. A lot of good melodies create tension in the middle by landing on the 2nd, 4th, or 5th interval above the root note and hanging there for a second. Then the tension is resolved by going to the root note. To the ear it sounds "logical".
This will seem dumb, but think of Twinkle Twinkle Little Star: the word "star" is on the 5th, and you know it can't end there. Your ear wants it to go on, and it's kinda happy when it gets to "are". But then it goes on, and when it gets to "high" it lingers on the 2nd. And it still doesn't resolve! The next line ends on the 2nd as well, with "sky". Only THEN, when your ear can barely handle the suspense, does the next line resolve back on the root note.
So, that's the template, now mess around with it, break the rules.