Write a melody using only four notes. Make it memorable enough to hum all day.
Severe pitch limitation is one of the oldest tricks in songwriting. "Happy Birthday" lives in a tiny range. So does most of "Hey Jude." So do most folk songs that have survived a century of being sung by strangers. When you only have four pitches to work with, you stop chasing novelty and start working on phrasing, rhythm, and the shape of the line.
Pick your four notes before you start, not as you go. Otherwise you will cheat. Once they are fixed, the constraint forces you to repeat, rearrange, and accent — which is exactly how memorable melodies are built. Test the result by walking away for an hour. If you can still hum it when you come back, you did it right.