Default setup ubuntu cannot resolve .local domain, I usually add .local domain manually at /etc/hosts file. But recently I feel that was wasting time…
I got simple solution & great explanation from OzPHB at ask ubuntu - ubuntu .local domain dns lookup not working.

Ubuntu Default /etc/resolv.conf File
When I check /run/systemd/resolve/resolv.conf it’s pointing to my local dns server, while original /etc/resolv.conf pointing to 127.0.0.53.
The solution was easy,sudo mv /etc/resolv.conf /etc/resolv.bak && sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
If you browser still cannot resolve .local domain, clear the data & cookies or close it then open your browser again.