.SetActive(); not working in one method but is working in Start()

Basically im trying to enable a game over screen but the setactvie isn’t working in the GameOver() method, i then tried using setactive in the start function and it works, ive also tried setting it to false instead of true and having it start on to test it and that didn’t work either

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

public class gameOver : MonoBehaviour

    private void Start()
        //this was working when it wasn't a comment and the object was active before play 
       // gameObject.SetActive(false);

    //is called without any paramaters 
    public void GameOver()
        //this is printing to the console, confirming the method is running 
        //ive also set this to false and had it start as active to test and that didnt work either 


I think it has to do with either a parent is inactive or the behavior of Start() or SetActive().
You must show more code to get help. Also read

Its because the gameobject isn’t active so the code won’t work, you should create a parent object and have the script on that and that can control the child gameobject