How to rotate a stick to connect two balls?

Hi, I have two balls in my scene,
if they are quite close, I want to make a stick between them.
but I do not how to get the rotation for my stick?
looking forward to your kind help.

Calculate the direction first:

Vector3 direction = (obj2.transform.position - obj1.transform.position).normalized;

Then you place the stick in one of the objects. (You might want to place the stick between the two objects instead)

stick.transform.position = obj1.transform.position;

And make it face the direction calculated:

stick.transform.forward = direction;

There is also this: