I personally like advocating after 20 minutes of being stuck and unable to progress any further. If you're stuck but keep making incremental progress, reset the timer.
It might seem silly but if you're able to make slow incremental progress you'll eventually figure it out and it helps grow your intuition of what to do to fix/unstuck yourself. I don't know of any other way to develop that intuition other than going through it yourself (if you have any tips I'd love to hear your thoughts!). Yes, it might be slow at first but the compounding effect on your growth cannot be overstated. It's also not a hard rule, if you're on some sort of time crunch and need help you should obviously feel free to ask for it.