System Preferences -> Network -> select Wi-Fi os left panel -> Advanced on right panel -> DNS -> add new DNS server for example 8.8.8.8 and 8.8.4.4 ( Google Public DNS) or 1.1.1.1 and 1.0.0.1 ( Cloudflare and APNIC DNS) or another public DNS provider.