Algorithme & Cognitive tree-like operation

I have a serious problem with the algorithm. I have a cognitive tree-like operation and very fast, I have almost no control over it. So when I come across complex questions whose implications are vaguely known to me, I can put them together without hardly thinking (it just comes to me) to build an efficient algorithm. However, when I am faced with algorithms, no matter how simple, such as in the “Easy Training”, I am unable to find a solution quickly, especially when I have to use methods I do not know.

To solve very simple problems, I have to make a very big mental effort, to curb my natural way of working, to cut out step by step each cognitive path I take, it is very frustrating! And as soon as I am faced with a native function that I am supposed to know and that I ignore and that is an obligatory passage in the processing of the algorithm, I am at a dead end. This feeds stress, the stress that paralyses me completely when it exceeds a certain limit, very very low…

I’ve been told that I know things that senior developers don’t, but I’m missing too many basics. And I’ve been told that I’m weak in algorithms, which is a real problem as a developer.
I’m working hard to improve, and I came here to do just that. But when I see the difficulties I’m having here on these trainings, I have serious doubts, and I’m not giving up, but it’s depressing.
I like code, I only like that. I have to persevere.

Does anyone understand what I’m going through and can they give me some advice?
Thanks to you