Slider to modify a countdown time in another scene ?

Hi there! I’m pretty new to this and I am developing a simple game of few scenes. In the first there are the instructions, while in the second there is the actual game (in which a task needs to be carried out within a certain amount of time, otherwise it opens the game over scene).
In the instructions scene I decided to create a slider to be able to adjust the countdown time.

Here, there is how I modified the slider (image), while below there is the code of the script (TimerChangeScene).

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TimerChangeScene : MonoBehaviour
{
    public string levelToLoad;
    public float timer;
    private Text timerSeconds;

    // Start is called before the first frame update
    void Start()
    {
        timerSeconds = GetComponent<Text>();
    }

    // Update is called once per frame
    void Update ()
    {
        timer -= Time.deltaTime;
        timerSeconds.text = timer.ToString("f2");
        if (timer <= 0)
        {
            Application.LoadLevel(levelToLoad);
        }
    }

     public void AdjustTimer (float newTimer)
    {
        timer = newTimer;        
    }

Can someone help me?

The way I understood your question, you want the timer to start when the second scene is loaded. Therefore you would need to put the Update function of your script into some script that is on some GameObject in the second scene.

There are a few ways to share variables across several scenes. The easiest one would be to make a public static variable, which is accessible to all Scripts in all scenes. Another way is to use PlayerPrefs.SetFloat() on the slider and PlayerPrefs.GetFloat() in the Start Method of your other scene. The advantage of this is that the values are saved even after closing the game and restarting.

using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(Slider))]
public class SliderScript : MonoBehaviour
{
    private Text timerSeconds;

    //Variable for Method 1
    public static float timerDuration;

    // Start is called before the first frame update
    void Start()
    {
        timerSeconds = GetComponent<Text>();

        //Method 2:
        GetComponent<Slider>().SetValueWithoutNotify(PlayerPrefs.GetFloat("timerDuration"));
    }

    public void AdjustTimer(float newTimer)
    {
        timerSeconds.text = newTimer.ToString("f2");

        //Method 1:
        timerDuration = newTimer;

        //Method 2:
        PlayerPrefs.SetFloat("timerDuration", newTimer);
    } 
}


using UnityEngine;
using UnityEngine.SceneManagement;
public class Scene2Timer : MonoBehaviour
{
    private float timer;
    void Start()
    {
        //Method 1
        timer = SliderScript.timerDuration;

        //Method 2
        timer = PlayerPrefs.GetFloat("timerDuration");
    }

    void Update()
    {
        timer -= Time.deltaTime;
        if(timer <= 0)
        {
            SceneManager.LoadScene("GameOverScene");
        }
    }
}