Some people are geniuses and can just kind of do whatever comes to them first and they come up with good music. But for the rest of us, we need to study and learn tricks and practice to do anything worthwhile. I have come up with an algorithm, that anybody can use, to make awesome music. Really, you get to set how awesome the music will be, and then you will make it that good. The catch is that it might take a lot of time. But what it does do is prevent you from feeling stuck, like you can't go on.
Okay, here is the algorithm.
Given Q, which is the Quality of your song, a.k.a. how awesome it should be:
Step 1. Spend an hour or two and just wing it. Do random things, try effects or instruments you've never used before, go with the flow. Maybe start with a theme and work from there. The best way to do this is to Just Do It. One Hour Compos and SolidComposer Arena are good for getting you off your butt and getting Step 1 done.
Step 1 only has to be done once.
Step 2. Take a break.
Step 3. Think about your song. What's the thing you like least about it? Delete it immediately. If you use something like SolidComposer, you'll have version control so you don't have to get it back later if you're worried about losing it forever. Alternately you can just save it as a new file and then delete it.
Step 4. Add a new section. This is very similar to step 1, except you only have to add a couple measures, or a break, or a chorus, not an entire song. Just do something that is additive in nature.
Step 5. Is your song at least as good as Q? Is it as awesome as you wanted it to be originally? Don't go easy on yourself. Don't settle. Really think if you've met the bar. If not, go to step 2.
If you make it out of the steps without cheating, you have successfully created a song to an arbitrary quality metric. You are a winner!
tl;dr
while (song is not awesome) {
take a break;
delete the worst part of song;
add a new part to song;
}