First, try this:
sudoedit /etc/systemd/resolved.conf
Under the [Resolve] heading, check that this line is 'yes', not 'no':
MulticastDNS=yes
ASIDE:
I was using gedit as the sudoedit editor, but I got rid of gedit due to file corruption and a memory leak (I replaced it with Pluma, a fork of gedit)... it then defaulted to vim, which I find unusable. Another disadvantage of using a GUI editor as sudoedit editor is that if you have trouble and can't boot to a graphical shell, you also cannot sudoedit files.
To switch to nano as the default sudoedit editor:
sudo apt install nano
sudo update-alternatives --config editor
Still not perfect, as the key combinations are unintuitive, but at least they're listed at the bottom of the screen in nano.
Not sure if this will help, but...
sudo apt show libnss-mdns
Package: libnss-mdns
Version: 0.14.1-1ubuntu1
Priority: optional
Section: admin
Source: nss-mdns
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 153 kB
Depends: avahi-daemon (>= 0.6.16-1), base-files (>= 3.1.10), libc6 (>= 2.14)
Suggests: avahi-autoipd | zeroconf
Task: print-server, ubuntu-desktop-minimal, ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Download-Size: 22.9 kB
APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Description: NSS module for Multicast DNS name resolution
nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality
of the GNU C Library (glibc) providing host name resolution via Multicast
DNS (using Zeroconf, aka Apple Bonjour / Apple Rendezvous ), effectively
allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local.
Then, in your router, if it's got the ability to set a domain, set it to 'local'.