It's generally a DNS-related issue. Since Arch is now typically dominated by Systemed, you probally need to checkit's likely that the status ofproblem lies with one of its deamonesdaemons, systemd-resolved, which provides network name resolution to local applications.
In my caseSo, the cause of this problemfirst step is that systemd-resolved wasn't running(inactive). So try to check its status first:
systemctl status systemd-resolved If you see that the value of Active field is inactive, you need to start it:
systemctl start systemd-resolved