Language contains melody naturally.
if you take a small section of say someone reading the news, and loop it. Then do something else like make a cup of coffee, you will hear the melody in the spoken word.
inter verse
lyric writers very often write this wrong it is very rarely picked up even when tuned and not sounding quite right. They have a section in one verse that naturally rises the same place in another that naturally falls. This creates a prosody issue, and the lyric never reaches its potential.
it is possible that someone who has studied nothing can write melody.
It would be the same as someone not taught mathematics discovering multiplication for themselves. Rare, unlikely, a hell of a lot of effort, but possible.
Note a well written lyric determines 80% of the melody content.
matters determined by the lyric.
Genre
BPM
Rhythm
pace
Some of the pitch.
the melody fir most part starts on the tonic so the listener can know the key it’s in. In the middle of the phrase there needs to be a pause, a musical comma, this is normally the 3rd of the scale and will be a longer duration. At the end of the phrase there needs to be a cadence. The last note of which will be the tonic. The genre you are writing will determine the other note.
the natural form of the language will determine some of the intervening notes.
And of course there is pattern variation and repeat. So when you have two bars of notes you have the whole section. Because it’s repetitive with variations.
I would see maybe once a month a lyric posted in a forum where I go oh yea that goes like this.
Cheers
Gary