As with any writing discipline, there is a process in creating a piece of music. The important step is to write down as many ideas on manuscript paper as they present themselves, even if they are not the final ones. They can always be revisited with the option to choose the best melodies later on. This process should be part of a daily routine.
Don’t get discouraged. A brilliant idea or ideas result in spending time, being patient, and having determination and consistency. Beautiful music is always waiting to be uncovered.