Knowing when to cut your losses swallow your pride and ask for help is legitimately an incredibly important dev skill. I've met otherwise decent developers that could disappear in a hole for a month on a simple problem that anyone else on the team could help them work through in a few hours because they didn't want to look dumb.
I'm torn about this because I have good mentors but I genuinely want to try to learn how to code and not just have the answers given to me right away. At least I'm only working on volunteer project so being slow isn't really holding anyone else up.
Don't be torn - solve it yourself until you can't! It's not helpful to be someone who constantly runs to other folks to fix their stuff and neither is it good to be someone who will just frustrate themselves struggling without progress.
If you're a junior developer you will probably get time boxed tickets, just try and catch yourself if you're spinning your wheels (and that isn't easy, it takes practice).
As with most things in life balance is important, you don't want to be at either extreme.