In editor: Select your first game object by clicking on it. Then right click the transform of the first object and click "Copy Transform"Component". Then select the other game object, right click its transform and click "Paste Component Values".
Edit: I made you a gif!
