There is no easy answer to this question. Every piece starts differently. Sometimes a melody, sometimes a chord structure, etc
When I lack an idea, I sit at the piano and just play stream of conscious. Sometimes I hit on a measure or 2 that I liked melodically or harmonically. Other times I just noodle and see what happens.
Another successful method I use is to visualize something and score it in my head. Or watch a scene from a film you like, cut the sound off and score it.
Take 4 bars of a piece you like and rearrange the melody. Invert notes, make it minor if major. If the melody leaps a 6th, invert to a 3rd.
There are a myriad of ways to start but it is important that you DO start! Don't wait around for inspiration. Be inspiring instead. Once you start writing, the music should be your inspiration. Ideas exist all around. They are just floating around in the universe waiting for you to grab one. I know that sounds sort of zen-like but it
is true.