Is there anything I misunderstand about Awake in Unity Lifecycle?

For example, the position value of the originPos will store the position value of the object initially set in the Awake step, so if OnEnable initializes the position value of the current object to the position value of the originPos, the current position value should be changed to the initial position value of the object received in the Awake step.

However, for some reason, originPos was updating the position value of the current object during Runtime, which was confirmed through Debug.Log in Update() statement.
(Of course, there was no place to call or initialize originPos separately.)

Is there anything wrong with me about Awake or anything else?

    private void Awake()
    {
        originPos = GetComponent<Transform>();
        originPos.position = new Vector3(transform.position.x, transform.position.y, transform.position.z);
    }

    private void OnEnable()
    {
        Init();
    }

    private void Update()
    {
        Debug.Log($"Current OriginPos is ({originPos.position}).");
    }


    private void Init()
    {
        transform.position = originPos.position;
        Debug.Log($"Initial Transform Position is ({originPos.position}).");
    }

Of course, I know other ways to initialize the position value.
But I’m frustrated that I don’t know what I was wrong.

The issue here is that transform and GetComponent<Transform>() are references to the same Transform component on the gameobject. So in other words, whenever the gameobject Transform position changes, originPos.position also changes, because they are actually the same component.

Instead you should only store the position as originPos, not the whole transform.

private Vector3 originPos;

private void Awake()
{
    originPos = transform.position;
}

private void OnEnable()
{
    Init();
}

private void Init()
{
    transform.position = originPos;
}