If your code is just slipping away from you, no clue what’s going on, then that’s some kind of knowledge debt. You need to start at some end, identify a problem, re-read instructions to figure out what that part of the code should be doing, learn about how to do that something, fix that code… and move on to the next problem.
This could take a while. That doesn’t make it the wrong approach.
Have you got a good idea of what the whole code is supposed to be doing? Could you describe each part in English? If not, then you’ve just identified a problem (which is good, because now there’s something to fix) and fixing it is done by studying the instructions.
Or, if you do know just how each part should behave, then you can test those things. Use your code in ways that tests what it’s supposed to do - see if you can do the operations that the instructions describe. If there’s some operation that isn’t being carried out correctly, then you can start thinking about why it should have worked, what the program should have been doing to support that, and then go look at the corresponding code and see if it’s really doing those things, perhaps adding additional prints to get more information about what it’s doing as it’s running.
As you do each exercise you can also consider what each part you wrote should be doing, and test it yourself to see if it really does have the behaviour that you think you just implemented. You might want even want to start over a few exercises earlier in order to do this and/or to be more meticulous about how closely you follow what the instructions describe.
Also, you ask for something more substantial, but you haven’t described a problem or asked a question. You’ve said: “help” – so since the first thing you’re missing is that you’re not identifying what’s wrong, that’s exactly what I’ll be helping with.