macOS
System Settings...

Wi-Fi
section, and click on Details
next to your network.
DNS
section in this pop-up menu.+
button under DNS Servers
, and input 1.1.1.1
. Do this again and input 1.0.0.1
.

OK
to save your changes. Your changes should now be applied.