In Google Drawings, so-called Connectors are special lines that stay attached to your shapes. When you subsequently move or rotate shapes that are connected, the connectors bend and stretch so that your shapes stay connected.
Let’s see an example using these two shapes that I’ve added to a drawing:
From the toolbar, click on Elbow Connector or (as I’ve done here) Curved Connector:
Hover your cursor over one of the shapes, and coloured connection points will appear around it’s edge. Select one to start your connector, and drag …
… to the desired connection point (any of the ones that appear highlighted) on the second shape:
Your two shapes are now connected; when you move one of them to another location in your drawing …
… your connector will move too.