If you move the schematic line, the component you added to it moves with the line.
You can, if you prefer, add the line to the drawing first and then connect the component. You would then find the end of the schematic line where an attachment point is displayed, and if prompted, follow the on-screen instructions to place the component.