Cannot convert transform.position to vector3?

While trying to create a script that resets the player’s position if they are to clip through the floor, I ran into an issue where the function “Collider.ClosestPointOnBounds()” was not accepting the assignment of the position parameter, which takes a datatype of Vector3, to transform.position. The error returned was “CS0029: Cannot implicitly convert type ‘UnityEngine.Vector3’ to ‘UnityEngine.Transform’”. How do I fix this?

private void ResetPlayerPos()
    {
        Vector3 playerPos = transform.position;
       
        if (Physics.CheckBox(overlapPos, playerSize, playerTransform.rotation, 3))
        {
            collisions[0] = Physics.OverlapBox(overlapPos, playerSize, playerTransform.rotation, 3)[0];
            playerTransform = playerCollider.ClosestPointOnBounds(position: playerPos);

        }
    }

I realized my error, I was directly setting the transform of an object to a vector 3 instead of setting the position of the player to a vector 3, below is my updated method (the if statement is used to call the method in the update method itself).

 private void ResetPlayerPos()
    {
        Vector3 playerPos = transform.position;
        playerTransform.position = Physics.ClosestPoint(transform.position, collisions[0],collisions[0].transform.position,transform.rotation); 

       
    }