General Question on JS/React Variables

Hello,
Hopefully, I am asking the right question in order to either receive an answer or receive direction to resources that can help me understand better.

I am currently doing the Full-Stack Engineer Certification and I have been going through the React section. I feel that I am not understanding the naming convention the further I am going and it is causing some frustration for me. I recently completed the Create a Playlist App with Spotify Project and having multiple files with the same names or different names for variables just throw me for a loop. Now I am currently going through the State Hook lessons and having similar confusion as to how do I know what variable I need to use in order to get the results I need. How can I read code that I didn’t write to make sense?

For me, it’s kind of like a story problem in math. how do figure out what is important for the function of the program and what might be important info but doesn’t pertain to solving the problem directly?

Thank you.