Are you writing a song? Is it easy or is it hard? If it's difficult, do you know why? Have you ever tried to repair a computer or a car or a light fixture? This has much to do about songwriting. If you don't know enough about writing words and music, it can feel impossible. The more you know, though, the easier it is. Computers are more complex than cars or light fixtures. A light fixture is easy to fix, by comparison. Having a few tools around help immensely. A voltage and ohm tester and tools for disassembly and assembly can help. I fixed one a couple of weeks ago. I found a burnt wire in it and rewired it.
What about songs? What's in a song? Words and music. They work together in a song. There is some sort of form to it, unless you write it in such a way that it is confusing and disorganized, making it difficult to follow. So, there's more to it than mere words and mere music. If anyone is to like it, sing along, or remember it, it should make some sense.
The harmony in songs is more complex than the melody. The way harmony is treated or used in a song could come down to chord selection, chord progression, chord voicing, and which instrument(s) play the chords. Then there is rhythm. There can be many variations to harmonic rhythm such as arpeggiated chords, chords in motion, "passing" chords and a myriad of other variations. One thing that melody needs to do, is to rest briefly on a note within a chord, from time to time. Otherwise, it might sound dissonant or even chaotic.
To write a song quickly, if it is to be a complete song (melody, words, and chords), a person might want to know what chords are available and what chords in a given key are available. There are tendencies but no actual laws or rules governing this. If you don't know chords, you won't know how they will sound or "work" in a song. There is a fast way to learn this. The first step is to familiarize yourself with tendencies in progressions. The second is to hear what chords sound like, one after the other. The third might be to hear them arranged with a bass line or with a bass line and some percussion as in a band. What if you don't have a band or know a band? Then what? Want some advice on this?