Are you using linux?
If yes, which server is listed in your /etc/resolv.conf?
Both Windows and posix platforms that link to their C library return TemporaryNameServerFailure when there is a temporary failure in DNS; a retry normally solves the problem.
When zig is running on linux without linking to the C library, it uses /etc/resolv.conf to find out the DNS server and after retrieving back data from the DNS server it might return TemporaryNameServerFailure.
In my case it only happened on Linux, and came down to some weird incompatibility between Ubuntu and my router’s DNS server feature (I think).
After changing the Linux DNS server from my router to Google’s (8.8.8.8 and 8.8.4.4) it started working.
The symptoms in other networking tools (like git) was that there was a 10 second pause (probably some sort of timeout) before a network operation would take place - but only for specific domains.