Type about:config in location bar
Search for network.trr
Change network.trr.mode to 2 to enable DoH.
Set network.trr.uri to your DoH server. Cloudflare’s is https://mozilla.cloudflare-dns.com/dns-query
The DNS tab on the aboutetworking page indicates which names were resolved using the Trusted Recursive Resolver via DoH.
Currently only supported in Firefox nightly.