Button.OnClick not working (trying to change scene)

I can’t get this to work on one of my scenes, it’s supposed to act as a main menu to be able to start the actual game. I have never managed to get the SceneManager.LoadScene function to work, but in this case it seems to not even work to click on the actual button. It’s just the default Unity UI button with nothing changed except the text and the fact that I have added the script above (and I am of course referencing to the button in the inspector)

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

public class MenuController : MonoBehaviour
{
    public Button StartButton;

    // Start is called before the first frame update
    void Start()
    {
      
    }

    // Update is called once per frame
    void Update()
    {
       StartButton.onClick.AddListener(StartGame);
    }

    void StartGame()
    {
        Debug.Log("Working?");
        SceneManager.LoadScene(1);
    }
}

I tried adding the onClick method to the button in Unity itself first but that didn’t work either, so that’s why I tried writing the script too. As I said, using “onClick” on button works perfectly fine in my other scene… I am clueless.

did you ever get it cause im also stuck ;/

Please show your code, with Code Tags. In the above code, they are incorrectly assigning a listener up to 100 times per second or more in Update(). They probably want to add the listener in Start() instead so it gets added only once.