There are basically two ways to compose songs. One way is by beginning from the bottom or the harmonic approach.
A composer/arranger takes a few chords, a phrase to hang them and arranges the harmony in some sort of pattern. An instance of that is the “loop” you often hear in modern music. A loop is merely a harmonic background over which a tune (or not) is performed.
The second way to compose music is by beginning with the tune. Composers might or might not have any idea of the finished idea (I prefer to not) but the melodic thought is fitted into some type of phrase. The most common term used is that the 8-bar phrase.
I find that starting with the tune to be the easier approach. Why? Because melody is simpler to move forward then harmony. It’s true that you can block out a couple of chords and organize them to make a loop, however this becomes inactive over time.
By using the principles of repetition and contrast, we can make a simple ABA form in no time in any way. We could go back and harmonize each section.
I used to prefer the harmonic approach initially. It was quite simple to simply jot down chord changes on an 8-bar term, create some sort of arrangement, and improvise a melody on top. There is nothing wrong with this approach at all. But I soon found myself learning involving the melody. Not because I think that it’s better, but simply because it’s the method I like right now.
In any event, it’s a fantastic idea to write music using a single approach or the other. If you attempt to harmonize a melody as you’re creating it, it will slow you down and might prevent the creative flow.