Some Internet Service Providers — notably AT&T, Comcast/Xfinity, Spectrum, and others — restrict or entirely remove DNS configuration options from the routers they provide to customers. The DNS settings in the router's admin panel may be grayed out, hidden, or simply absent. This is a deliberate choice by the ISP, and understanding why they do it helps you understand the workarounds available to you.
Controlling DNS gives the ISP visibility into every domain that every device on your network requests. This data is commercially valuable. ISPs can use DNS query logs for analytics, targeted advertising, and to build browsing profiles of their customers. Some ISPs also practice DNS hijacking — when you mistype a domain name or visit a domain that does not exist, instead of returning an error, the ISP redirects you to a search page filled with advertisements. This generates revenue for the ISP, but only works if the ISP controls your DNS.
Not all ISPs lock DNS settings, and policies can vary by region and plan. Some ISPs provide a "gateway" device that combines a modem and router in a single unit, and these gateways are especially likely to have restricted settings. If you are unsure whether your router's DNS is locked, the next step will help you test it.