Crosstalk Solutions have provided some helpful videos to understand how to setup a Unifi network from start to finish. This can help configuring more advanced networking features because the Unifi Security Gateway can be tricky to setup when getting started. Their video goes through the process of setting up VLANs for a guest network. There is also a video for Pfsense VLAN and guest network setup. Check out the links and videos.