How do I change scenes when player falls off the terrain / The player just keep falling

In my scene the player can fall off of the terrain by just keep walking or running to the edge of the terrain . I am trying to switch scene and going into gameover scene.

script attached to player GameObject

void Update() {
    if (transform.position.y < -100f) {
        //TODO Gameover
    }
}

An option would be to put a large object to catch him down there and when there is a collision with that object you have you switch scene code.