There are a couple of ways to use a QR code to join a WiFi network on an Android smartphone.
The method shown below on the left uses the camera and is the quickest way. When the QR code is recognized, its SSID (pointed to by the red arrow) is displayed. Just touch to join.
The method on the right is accessed by Settings ... Network & internet ... Wi-Fi. Touch the QR code icon (again, the red arrow) to the right of the "Add network" option then scan the code.