By Aditya Shukla, Guitarist & Psychologist
Learn how chords resolve within a key. Use those sequences to create tension and release so your riff "moves" somewhere.
When you are not fluent, your brain is spending a lot of effort. That blocks out any chance of thinking more. Practice well enough to be fluent so you let your brain do the musical thinking.
If you are too rigid while playing, you don't let your brain get the chance to accidentally discover some musical sequence. Dedicate time to noodling around and trying out things at random.
Musical sequences often sound bland by themselves. Rhythm brings out the appealing part of it. Try thinking with a "rhythm first" approach.
Mix and match what you learn from other artists. Listen to a variety of artists and learn what they have done in their songs. Decompose and recompose.
When you record sequences, you can quickly adjust, rewrite, and re-arrange musical sequences and experiment. Sometimes musical flow appears when you observe your music as a listener.
Other musicians add ideas to your music because they interpret it differently than what you imagine it to be. This often leads to an exciting change in the songs structure.