Rewarded video ad Unity

I’m trying to create a reward system in my game where once the player dies, they have the option of watching a rewarded video ad after which the game restarts and the player score is set to score before the player died. I have been trying to figure this out for the last 2 hours but unable to achieve the desired result. This is my game manager script:

public class GameManager : MonoBehaviour {   public Player player;   public Transform startLocation;    public GameObject startPanel, ingamePanel, gameoverPanel;     private bool gameHasStarted;    public enum GameStates   {     Start,     InGame,     GameOver   }    public float playerScore = 0;   private int savedScore;   private int difficultyLevel = 1;   private int maxDiffLevel = 10;   private int scoreToNextLevel = 10;        private void Start()   {     SetupNewGame();   }    void Update()   {     if(playerScore >= scoreToNextLevel)     {         LevelUp();     }      if (player.dead == false && gameHasStarted)     {         playerScore += Time.deltaTime * difficultyLevel;                }                     if (playerScore > PlayerPrefs.GetInt("HighScore", 0))     {         PlayerPrefs.SetInt("HighScore", (int)playerScore);     }        }   void LevelUp()  {     if (difficultyLevel == maxDiffLevel)         return;     scoreToNextLevel *= 2;     difficultyLevel++;   }  public void SetupNewGame()  {            playerScore = 0;             player.transform.position = startLocation.position;                   UpdateUI(GameStates.Start);  }   public void StartNewGame()  {     player.dead = false;     gameHasStarted = true;     UpdateUI(GameStates.InGame);  }  public void GameOver() {     player.dead = true;     gameHasStarted = false;             UpdateUI(GameStates.GameOver);         }  void UpdateUI(GameStates gameState) {     startPanel.SetActive(false);     ingamePanel.SetActive(false);     gameoverPanel.SetActive(false);      if (gameState == GameStates.Start)     {         startPanel.SetActive(true);     }     if (gameState == GameStates.InGame)     {         ingamePanel.SetActive(true);     }     if (gameState == GameStates.GameOver)     {         gameoverPanel.SetActive(true);     } }    public void ReceiveReward()  {             savedScore = (int)playerScore;             SceneManager.LoadScene(1);             playerScore = savedScore;          } } 

I have created a button for and added the ReceiveReward() in the onClick function. However when I click on this button, the score is reset to 0 and not the score before the player died. Can someone please help?

EDIT

I have added this code to the game manager:

private void Awake() {     if (instance == null)     {         instance = this;     } } 

The score is still reverting to 0.