Safari uses the macOS systemwide DNS resolvers.

You can print the current resolvers configuration using scutil --dns.