Api confusion Personal API key doesn't work Youtube Video API key does help

I don’t get it if I use my google API key {removed api key} or any other API key I get from google or current https://openweathermap.org/current it doesn’t work. But if I use this guy API key who made the tutorial video on YouTube it works. Why would my API not work but his will? I tried
https://samples.openweathermap.org/data/2.5/weather?id=2172797lat=’+lat+’&lon=’+long+’&appid={removed api key}
Nothing appears in my console.nor will my link tell me any information on my location
When I use exactly the same link written in his YouTube video
which is in my code pen my console works and tells me location with working link. I really want figure this out so future projects I can use my own API and have it function like it should instead of using someone else’s API. Thanks!

Edit by Moderator: removed api keys.

I don’t think an API key from Google will work with openweathermap. You need to sign up on openweathermap to get an API key that works. Which you don’t have to do because fcc provided an endpoint that you can use without the need for any API key: https://fcc-weather-api.glitch.me/.

And don’t post API keys in public. They’re supposed to be a secret.