Have a look at CoreDNS.
Personally I avoid running a local DNS server, as most of the gateway, router, firewalls allow you to configure static host entries which are then automatically resolved.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
Have a look at CoreDNS.
Personally I avoid running a local DNS server, as most of the gateway, router, firewalls allow you to configure static host entries which are then automatically resolved.
I just use pihole as a local dns. Ad blocking is nice, but you can disable that part if you'd like and just use it to server local DNS records.