Hello there,
I’m new here. Can someone please explain how objects work so I can get a better understanding. How I am supposed to use my code.

for Javascript:

its highly recommended to read guides about such general questions (given plenty of these guides exist) and then ask a specific question if you are stuck on something, which we can answer, this way, you get best of both worlds