Step beck for some perspective.
Everyone gets a mental block at some time or another, whether it’s during planning, designing, or coding.
You’ll be amazed at what can happen if you step back when you “can’t see the wood for the trees”.
Simply take a break, go for a walk, make a cuppa, or work on something else. When you come back to it, whether in 5 minutes or 5 hours, you’ll be taking a fresh perspective, and hopefully something will click and you’ll realise the solution.