DNS Easy Switcher for macOS allows you to quickly change DNS settings via the menu, preventing internet issues and letting you set custom servers.
I’m not sure why, but sometimes my DNS settings change on macOS, causing the internet to stop working. So I started looking for a way to switch them quickly.
The solution that worked for me is the DNS Easy Switcher utility, which lets you change DNS settings right from the menu bar. You can instantly switch to preset options like Cloudflare, Quad9, AdGuard, or GetFlix.

Of course, you can always add your own server addresses. You can also prevent the system from overriding them.