pkg on FreeBSD uses libfetch under the hood to fetch packages and metadata. Unlike modern HTTP clients, libfetch does not implement Happy Eyeballs which lets a client race IPv4 and IPv6 connections and use whichever responds first.
Without this protocol, with a broken IPv6 path, the client just sits there waiting for the IPv6 connection to time out before falling back to IPv4. That is exactly what pkg does when IPv6 is broken on your network — it hangs.
The fix is straightforward: tell pkg to use IPv4 only.
Edit /usr/local/etc/pkg.conf and find the commented-out line:
#IP_VERSION=0
Uncomment it and change the value to 4:
IP_VERSION=4
pkg will now skip IPv6, and installs and updates will no longer stall on networks where IPv6 connectivity is broken. That may be a better temporary solution than disabling IPv6 entirely.