Which URL should I use when connecting to my Kafka cluster?

You should list all brokers URLs to your client and not only use the cluster hostname. For example, is your cluster name is test-speedcar and you have three nodes in the cluster your broker list should look like this:

test-speedcar-01.srvs.cloudkafka.com:9094,test-speedcar-02.srvs.cloudkafka.com:9094,test-speedcar-03.srvs.cloudkafka.com:9094