This script will help you to install the GUI like KDE and GNOME.
git clone https://github.com/SunilSherkhane/FreeBSD-GUI-Installer.git
cd FreeBSD-GUI-Installer/
chmod +x ./installer.sh
./installer.sh
Please Note: the above commands should run on root if you have logged in to user account then do switch account with "su -l" and then try. If you are installing KDE plasma desktop then select X11 as a default display server.