I can't make my Restart Button work

Hi, I’m a beginner and I’m trying to create a Restart Button. I deployed its ‘RestartGame’ method into my GameManager script. Here you go my script:

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

public class GameManager : MonoBehaviour
    public GameObject[] enemies;
    public TextMeshProUGUI scoreText;
    public TextMeshProUGUI gameOverText;
    public Button restartButton;
    public bool isGameActive;

    private int score;
    private PlayerMovement playerMovement;
    private float enemyXSpawnPosition = 26.0f;
    private float enemyYSpawnPositionMin = -4.0f;
    private float enemyYSpawnPositionMax = 4.0f;
    private float enemyZSpawnPosition = 12.75f;
    private float enemySpawnDelay = 2.0f;
    private float enemySpawnRate = 3.0f;

    // Start is called before the first frame update
    void Start()
        isGameActive = true;
        score = 0;
        playerMovement = GameObject.Find("Player").GetComponent<PlayerMovement>();
        InvokeRepeating("SpawnRandomEnemies", enemySpawnDelay, enemySpawnRate);

    // Update is called once per frame
    void Update()

    // Generate random Enemy objects
    void SpawnRandomEnemies()
        if (isGameActive == true)
            Vector3 enemyRandomSpawnPosition = new Vector3(enemyXSpawnPosition, Random.Range(enemyYSpawnPositionMin, enemyYSpawnPositionMax), enemyZSpawnPosition);
            int enemyIndex = Random.Range(0, enemies.Length);
            Instantiate(enemies[enemyIndex], enemyRandomSpawnPosition, enemies[enemyIndex].transform.rotation);

    //Score text method
    public void UpdateScore(int addToScore)
        score += addToScore;
        scoreText.text = "Score: " + score;

    //Game Over Text method
    public void GameOverText()
        isGameActive = false;

    public void RestartGame()

I dragged the Restart Button in the inspector, Created its OnClick(), dragged the Game Manager on it, and set the RestartGame function.
When the game ends, the Game Over text shows up, but not the Button.

can you share the SS of your Scene item list, I think i can solve your problem.
need more specific details.

Of course, here you go: