Unable to look up TXT record for host ****.****.mongodb.net from GCP ap

Is there a final “Caused by” that’s cut off from that screen shot? That could help diagnose the issue. It’s possible that you’re running into https://jira.mongodb.org/browse/JAVA-4018, in which case updating the Java driver to 4.5.1 or later will fix it.

Is this a self-managed cluster, or are using Atlas, or some other service? I am pretty sure that Atlas always registers a TXT record in DNS, but other services may not.