For me, writer's block often strikes when I'm not sure how a character would react in a particular situation, or I'm not 100% in love with the direction of a chapter/arc. When that happens, I'll take a brief break away from whatever I'm writing, change the scenery (go out for coffee/snack/a walk), run ideas by a third party, and come back with fresh eyes.
Some people write their best work at certain times of the day. I've learned that my best material is written between 7:00am - 2:00pm and anything before/after that is hot garbage. As others have mentioned, finding your why for getting stuck in a block is huge, and can help you strategize options to transcend the block. Wishing you luck with your writing!