As you all know in order to connect our google home devices we use a special google home app on our smartphone. But the questions is , suppose that app know the current WiFi password, how that password gets sent to google home itself when google home has not been connected to any WiFi yet? is it via Bluetooth or something else?
Google home's initial setup is likely similar to the initial setup on a Chromecast device. The Chromecast acts as an access point (i.e. something a WiFi-enabled device can connect too, just like your router). The Google Home app is programmed to search for and connect to this access point. Once connected, the two devices can communicate information between eachother. In fact, when setting up a Chromecast device, a message is displayed in the Google Home app stating that "you may be disconnected from WiFi for a moment".
Google Home probably works in the same way - it acts as an access point, gets paired with the phone and they exchanged information/passwords and then Google Home connects to the WiFi.