Imagine we have a non moving object and there is another object that is moving. Below is a script that we can attach it to the non moving object, to move exactly same as that moving object (instead of making it child of that object).
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CopyPosition : MonoBehaviour
{
	
	public GameObject positionTarget;
	
    // Start is called before the first frame update
    void Start()
    {
        
    }
    // Update is called once per frame
    void FixedUpdate()
    {
        transform.position = positionTarget.transform.position;
    }
}
But the movement following mechanism here is too fast. What if we want some delay to make it smooth? The answer is we need Vector3.Lerp function. And here is the modified script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CopyPosition : MonoBehaviour
{
	
	public GameObject positionTarget;
	public float moveSpeed = 5.0f; // Higher = faster movement
	
    // Start is called before the first frame update
    void Start()
    {
        
    }
    // Update is called once per frame
    void FixedUpdate()
    {
        transform.position = Vector3.Lerp(transform.position, positionTarget.transform.position, moveSpeed * Time.fixedDeltaTime);
    }
}