@Roee_Hasson I believe you are using replicasets with multiple nodes. Correct me if I am wrong.
In Replicaset you need to give all replicaset in URI
Refer to this article once https://www.mongodb.com/docs/drivers/node/current/fundamentals/connection/connect/#connect-to-a-replica-set