In my opinion, there are two main parts to composing: thinking of ideas and turning those ideas into coherent music. Each has their challenges. Depending on how you decide to go about composing, one part may be easier than the other. I typically start writing in just a single way. I usually just mess around on my piano until I have a thematic idea that I think could turn into a song. It’s kind of like how pop writers go about writing. They spend a lot of time just developing a hook. After all, I seem to recall reading that most people decide whether or not they are going to like a song within only a few seconds. Therefore it is of the utmost importance to have a good hook, not only in pop music, but other types as well. Of course, you can earn back the listener’s attention later, but it is much more difficult to do that than just get it right the first time.
When writing piano music or music for more than two people, there are usually three major groups of stuff, the melody, bass, and accompaniment/harmony. To write my hooks, I usually only focus on one or two of those things at a time. I’ll play variations on a simple melody, sometimes while playing block chords underneath it. Obviously, I try to make the harmonies at interesting as possible. Surprise is the key here. To write a truly interesting song, you need to do things that the listener doesn’t expect. So I’ll improv something that I would expect and then change the ending. Maybe add a short riff in the middle. Sometimes the final product is just a melody for a few measures. Unless you know exactly what you’re wanting to do, I think the hardest part of writing music is just starting. Once you have an idea it gets easier for a while until you’ve used up all of the basic variations and need to think of something new again to keep it interesting.