Most servers are not able to access the Google API.
Invidious report of the same(ish) problem: https://github.com/iv-org/invidious/issues/4045#issuecomment-1674373088
You just need to connect the raspberry to your network, set a static IP and set the DNS server in your router to the IP of the RPi. Your router handles all the Routing and Wifi and the RPi just resolves DNS queries.
I suggest looking up what DNS is and that should clear things up for you.
Btw, I gess you meant wlan with wan, those are two different things in networking.