In my opinion, and based on my experience - even when you.wrote the code from scratch without any guides or help - you most probably will need some time to comprehend the logic of the code you write yourself, and it is perfectly ok!
Usually the code's logic is complicated and following it might take some time - the important thing is that if you manage to understand the logic after giving it some time, helped by notes you wrote in order to help yourself in such situations - then you can move on safely- we learn how to code and not how to memorize code 😊
Now - I'd you feel like you didn't grasp the logic behind the code and you just copied the instructor without getting the logic - that's when you better go over the code again in o order to understand the logic, not to memorize it.