Stop a YT video by clicking a div/button

Hi Everyone! I’m fairly new to Webflow so I would really appreciate your help! I’m trying to build a tutorial page that is inspired by Webflowns this one. I assume they used some JS in order to make the videos dynamically change based on which lesson you click.

Since I don’t have coding experience I tried doing it using the hide/show function. The issue I’m having is that the video still keeps playing after selecting a different tutorial lesson. How can I fix this?

Link to the project: https://leadiq-homepage.webflow.io/academy