In menu, navigate to Tools > Preferences > General > Settings > Network Settings.
Select Enable DNS over HTTPS.
Choose any of the following to set DNS resolver:
(Default) Set Cloudfare.
Set a custom DNS resolver.
Type about:config in the URL bar.
In the search area, type network.ttr.mode and set any of the following values:
2:
Turns on DoH and keeps the regular DNS only as a backup.
3:
Turns on DoH with no regular DNS support.
In the search area, type network.ttr.uri to set the domain name of the DNS resolver.
The default Cloudfare URI is https://mozilla.cloudflare-dns.com/dns-query
(Optional). In the search area, type network.ttr.bootstrapAddress to set up IP address.
Cloudfare: 1.1.1.1
Google: 8.8.8.8