In latest versions of macOS, including Monterey, you can’t easily view your DNS cache as it’s set to private.
In previous macOS versions, DNS cache was viewable using the following steps. Open Console app in Finder > Applications, select your Mac and type in any:mdnsresponder in the search bar, hit Enter. Open Terminal in Finder > Applications and run sudo killall -INFO mDNSResponder. Return to the Console app and view your list of cached DNS.