How to re-apply components?

The components from Figma file A is being used in file B.
I’d like to have the components in file B and want them to be the main component for file B.

How can I achieve this easier & faster? Is dragging the component one by one the only option?