I find that brainstorming is incredibly helpful when I'm stuck on what to write next. I'll sit down with a piece of paper and a pen and just start jotting down any and every idea that comes to mind, no matter how crazy or far-fetched it might seem. Once I have a good list going, I can start to narrow it down and figure out which direction I want to take my writing in.
There are a few different ways you can brainstorm on your own or with a group. You can do a free-write, where you just write nonstop for a set period of time without lifting your pen from the paper; or you can do a mind map, where you start with a main idea in the center of the page and branch out from there with related ideas. You can also try word association, where you come up with a word and then brainstorm a list of words that come to mind in relation to it.
If you're having trouble getting started, there are plenty of online resources and prompts you can use to jump-start your brainstorming session. Once you get into the habit of regularly brainstorming, you'll be surprised at how helpful it can be in coming up with new ideas for whatever you're working on.