In Firefox, you can set a custom secure DNS. For this, first go into the Firefox settings and select the Privacy & Security tab. Then scroll down to the “DNS over HTTPS” section and choose from one of the protection levels.
Select “Increased Protection” and then “Custom” for adding a custom DNS provider.