Changing your DNS server changes the lookup step, the moment your device finds out where a website lives. That step happens before the page itself starts loading.
What DNS actually does when you open a website
Think of DNS as asking for directions before a drive. When you type a site name, your device first asks a DNS server, "Where is this?" and gets back an address. Only then does the real trip, loading the page, begin.
A different DNS server can change how quickly you get those directions. If a page feels slow to start loading, DNS might be part of it.
This is the mix-up behind most "switch your DNS for faster internet" advice: the lookup and the trip that follows are two different steps.
Is 1.1.1.1 or 8.8.8.8 the better choice?
Both are public DNS services you can point your device or router at. Cloudflare's resolver is 1.1.1.1 and Google Public DNS is 8.8.8.8; to use one, enter that address in the DNS settings of your device or router.
For device-by-device steps, see Cloudflare's 1.1.1.1 setup guide and Google's Public DNS "using" guide.
Does changing DNS hide your browsing from your ISP?
Not by itself. Changing which DNS server you use is a different thing from encrypting the lookup. Encrypted DNS, such as DNS over HTTPS, protects the question your device asks.
If hiding your activity from your ISP is the real goal, read our explainer on what a VPN hides before deciding.
What about Private DNS on Android?
Android's Private DNS setting is the phone-level way to use encrypted DNS for lookups.
What to do now
If your goal is privacy for lookups, switch on encrypted DNS. If you want to try a public resolver anyway, set it up from the official page, and switch back if nothing improves.