MacBook can access the internet but no webpages resolve
Can you open a terminal and type this:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Enter the admin password for the Mac to run the command. You may need to reboot the Mac if the issue hasn't resolved straight away.