I find that using ways to step away from code help think things through in ways to overcome roadblocks. One recent trick I've found is rubber duck my issue into ChatGPT, which I used to do in a notepad (either digital or physical), the added advantage of ChatGPT is I can hit Enter once I'm done with my thoughts and get a response, which might have a solution in it.