querying a .local domain is essentially a broadcast
who has name bob.local
The broadcast is sent to the network broadcast address defined by the netmask e.g. 192.168.1.1/24 has 192.168.1.255 as broadcast address and the sender await a response.
The device with the name is responding to the broadcast address
ip.x.y.z has name bob.local
The package nss-mdns is an optional requirement for avahi - which in turn is required by NetworkManager and thus the package may not be synced to your system.
The avahi daemons may not be enabled so to get a fully functional zeroconf you may need sync an extra package and enable services as required.
$ pamac search mdns --no-aur | grep Installed
nss-mdns 0.15.1-2 [Installed] extra
$ systemctl list-unit-files | grep avahi
avahi-daemon.service enabled disabled
avahi-dnsconfd.service enabled disabled
avahi-daemon.socket enabled disabled
$ cat /etc/nsswitch.conf
# Name Service Switch configuration file.
# See nsswitch.conf(5) for details.
passwd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files systemd
gshadow: files systemd
publickey: files
hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: files
$ ping -c 3 pihole.local
PING pihole.local (172.30.30.2) 56(84) bytes of data.
64 bytes from pihole.local (172.30.30.2): icmp_seq=1 ttl=64 time=0.278 ms
64 bytes from pihole.local (172.30.30.2): icmp_seq=2 ttl=64 time=0.633 ms
64 bytes from pihole.local (172.30.30.2): icmp_seq=3 ttl=64 time=0.296 ms
--- pihole.local ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2048ms
rtt min/avg/max/mdev = 0.278/0.402/0.633/0.163 ms