How do you move an object through script

hello, I have a 2D game that I want it to have a CheckPoint function where when a player enters the checkpoint(this works)

if(col.CompareTag(“Checkpoint”)

{

    Debug.Log("CheckPoint");

}

it then moves the SpawnPoint to where the CheckPoint is. which is the position of the CheckPoint which is(494.21, -8.413, 0)

To make things simpler and understandable I just want to transform the spawnpoint with that position (494.21, -8.413, 0) ill take care of the if statements.

If you have a reference to the GameObject of the spawn in the script then you can just position it using:

spawnObject.transform.position = new Vecvor3(x,y,0);

see the docs here.