I don't say I have writer's block. I say I'm stuck in my story. It means the same thing but writer's block, at least for me, feels like this wall I can't get over. "I'm stuck" feels more like a hill. What do you do when you're stuck?
Don't Beat Yourself Up
It's frustrating when you want to write but you can't figure out what happens next. Worse, you force yourself to write and it all feels like crap. Calm down. Almost every author goes through this. You aren't terrible. You aren't alone.
I'm writing the first draft of The Sciell's Legacy. Characters are at point A. They need to get to point B but I don't know how. I skipped that part, adding a comment as a reminder that something's missing. I started writing from point B. Eventually, I'll figure out the journey. For pansters, the first draft is usually terrible and full of plot holes. That's fine, you can fill them in along the way.
Plan Your Characters
This is for the pansters out there. We generally don't do character outlines. We just start writing. I was never a character planner in the past but recently, I'm finding it useful. Probably because it's an app and I'm a sucker for some cool tech. When I get stuck, I open Character Planner and start working.
Do Something Fun
I'll often get stuck when I think about my books not selling. I start wondering what's the point of even writing another story. No one is going to buy it. Or I get a bad review and think my books suck. That's when I take a break to watch something fun on YouTube, read manga or take a walk.
Do Some World Building
I couldn't see my way through The Sciell's Legacy so I stopped writing and started world building. There are a lot of aspects that need fleshing out like how the government works. If you're a fantasy or sci-fi author, take a step back and do some world building. It helps, at least for me, to handwrite the notes.
I view writing as not simply the act of sitting in front of a computer and cranking out words. I see it as world building, research, people watching, list making, journaling, day dreaming...reading. Relax and just write.