This quick guide explains how you can configure Firefox to resolve DNS over HTTPS.
DNS over HTTPS (DoH) is a new concept/protocol where the domain resolution is being done securely over HTTPS via a secure DNS server. The domains you type in your browser’s address bar are translated to an IP address and DNS servers help to translate them.
This brings an important aspect which is the privacy of the user. Your ISP or anyone may know what are the domains you are visiting and eventually may attempt to block them.
This feature encrypts your requests from your browser to the secure DNS server and eventually eliminates eavesdropping (to some extent).
Google, Mozilla, and Cloudflare currently testing this feature in their respective products,
This is how you can enable this in Firefox. This guide applies to all Firefox browsers as well includes the mobile versions from 60.x version onwards.
Currently, secure DNS servers are provided by major companies. For the latest list of secured DNS servers – check out this page.
How to Configure Firefox DNS over HTTPS

network.trr.mode values description:
0: that it is disabled and not used.
1: Firefox uses either native DNS or TRR depending on which is faster.
2: Uses TRR by default but will fall back to the native resolver if the name resolve fails for whatever reason.
3: Enables TRR only mode. Only TRR is used and there is no fallback.
https://mozilla.cloudflare-dns.com/dns-query
https://dns.google.com/experimental

Once the configuration is set. Close and restart Now you can securely browse Firefox.
Via Mozilla FAQ