Open "System Preferences", then "Network". On the left, select the network interface that is used to connect to the internet. For example, it could be Wi-Fi.
Click on "Advanced" at the bottom right, then go to the "DNS" tab. Click on the plus in the left column and enter the DNS record.
Popular DNS server options:
- Cloudflare DNS: 22.214.171.124
- Google Public DNS: 126.96.36.199 and 188.8.131.52
- OpenDNS: 184.108.40.206 and 220.127.116.11
To save, click OK, Apply.
Write to support