The C# script class called CheckPoint has one variable called respawnPosition, which is a Vector3 object that refers to the position the player's cube is to be moved to (respawned) if it collides with a Death tagged object. The default setting for this is the position of the player's cube when the scene begins. This default position is set in the Start() method; we set respawnPosition to the player's position before the scene started running.
Each time an object tagged as Checkpoint is collided with, the value of respawnPosition is updated to the current position of the player's red cube at this point in time (that is, where it is when it touches a stretched cube tagged as CheckPoint). The next time an object tagged as Death is hit, the cube will be respawned back to where it last touched the object tagged as CheckPoint.