When you are stuck on a problem, ask for help. The best developers I've worked with aren't the ones who know everything but are the ones who ask for help when they are stuck and want to help other developers when they get stuck.
When I started coding, I'd sit at my desk for hours struggling with problems that I could have solved in minutes if I'd just asked for help. I remember one time I spent just about a week trying to find the class that implemented some logic for a particular C# object. This was before I really understood generics. Being that the code was implmenting a generic, there wasn't any specific code for this new object. At the time I remember the team lead asking me multiple times if I needed any help. Everytime I told him I didn't. Now the opposite has happened to me as the team lead with other developers who are stuck and I'm offering help, I'm starting to understand it a little better.
I was afraid of looking incompetent or annoying the others on my team. But as I've grown through my career as a team lead and architect, I've realized that nobody expects you to know everything and your team actually wants to help you succeed. You learn by asking questions and accepting help from other people on the team.

Here are some of the things that were holding me back from asking questions when I first was starting out and why that way of thinking is holding us back.
You don't want to look stupid
I used to not ask for help because I didn't want people to think I didn't know what I was doing. Or I didn't want to come across as asking a stupid question to something that I thought everyone else knew and I was the only one how didn't. That thinking is stupid. As I've gotten older and more experienced I know that nobody thinks your stupid for asking questions or asking for help. I want to work with developers who want to learn and to grow. If you are not asking for help or asking questions then you're limiting youself to how much you can learn.
Now if I don't understand a thing I will try to figure it out while using all of the tools available to me - read the documentation, read the requirements and eventually ask AI. After all, you have to at least try to figure out the problem before you go looking for help. If none of those work, I will ask for help.
You don't want to be a bother
I used to think that if I asked for help from another developer I'd be breaking thier flow and be a bother. Part of that is true, you could defintely break someone's flow by asking them a question while they're in the middle of something. But that's OK, chances are that person doesn't care and they'll get back into their flow after they've helped you.
A really big part of my job is helping developers with code problems and just being helpful by answering their questions about the thing we're working on. My Slack and Teams is constantly being pinged with questions, but I don't care. I'm always happy to help other developers because I know what it's like to be stuck and need help. That feeling sucks and can sometimes make you feel like your helpless. I don't want anyone to be in that position or feel that way, so I'll gladly be knocked out of my flow so we get those engineers who need help back on track. That's a big part of what an architect and team lead gets paid for anyway.
You want to figure this out on your own
That's great and should be the first step when you're up against a challenge. After you have exhausted the requirements and documentation but you're still stuck, ask for help. Your entire team wants you and the project to be successful, being part of a team means leaning on each other to help us all become successful. That knowledge you gain by asking for help is going to help you the next time you hit a road block and that's all part of learning to become a better developer.
When I ask for help and clarification I always come away with a better understanding of the thing that I didn't understand before I asked for help. Getting help from the team will only make you a better engineer on the team. Instead of spinning for multiple days on a problem only to maybe get it right and understand the problem. Acknowledge you are up against a blocker and get help from someone who knows the domain you are working on. After they've helped you will have the expertise to move forward faster. And if a senior person is reaching out asking if you have any questions, if you do, say yes.