It’s possible to generate a QR code that you can use to connect to the WiFi without having to manually enter the password. To do this you can use this open-source website, or preferably, you can use the qrencode cli tool.

To install qrencode on MacOS you can use homebrew.

brew install qrencode

Then to generate the QR code

qrencode -o wifi.png "WIFI:T:WPA;S:<SSID>;P:<PASSWORD>;;"

Replace with your Network Name and with your password and you are good to go.

Credits:

https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/