OnClick not showing the functions in script

I had a TextMashPro button to my project, and out code it to switch scene, but under the on click and function, it showed no functions

NextSceneScript Code:

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

public class NextSceneScript : MonoBehaviour
{

    public void NextScene()
    {
        SceneManager.LoadScene("Main");
    }

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

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

9866478--1421826--Screenshot 2024-05-31 202237.png

Unity button onclick function script callback gameobject notes:

For sliders and dropdowns and other value-returning UI elements:

And passing “more interesting” things when buttons are pressed:

I tried following your images but whenever I brought the gameObject with the script in to the button, and sets the function, it turns it back into a script and doesn’t work