Ok one real tip- for beginners its said to be easier to stick to the pentatonic scale when creating melodies (no 2nd and 6th degree?)
Avicii, Kygo, all those guys that are getting/got big because of 'melodies' wrote them using whichever corresponding pentatonic scale fits above their section. Not gonna explain what they are, if you don't know you can look em up pretty easy. Takes another 2 notes out of the equation though so it will raise the odds of 'randomly' riffing a melody. Then if you feel you're missing a note that you don't have, its probably the 2nd or the 6th. Adjust accordingly.