Do the other students feel the same way? It might be worth starting a study group amongst your peers to help one another out.
Have you reached out to your teacher? they should be able to either help you catch up or steer you towards resources that better suit your pace/ learning style.
Code is overwhelming. Even experienced professionals hate diving in to somebody else’s code. It’s scary, poorly documented and we always think we could have done it better.
Don’t let that put you off.
A lot of us are practical learners. So like you we stare at a wall of code but struggle to comprehend it. But if you dive in and start editing, experimenting etc you’ll change the output and understand why it was written in a certain way.
Eventually once you’ve got it sussed you’ll be able to adapt a script to do what you want it. That’ll trigger the dopamine reward mechanism and you’ll be hooked like the rest of us.