scene managment not working

i’m trying to set something up so that when the player collides with the box it moves to the next level but for some reason the player just goes through the box and nothing happens, i even tried making other things happen when the collision occures like debug.log but still nothing happens.

heres the code i have ATM. please note that index is replaced with the index number for the scene in the build manager

using UnityEngine.SceneManagement;

public class LevelChange : MonoBehaviour
{

    public int index;

void onTriggerEnter2D(Collider2D other) {

        if(other.CompareTag("Player")) {
            SceneManager.LoadScene(index);
        }
    }

}

C# is case sensitive

i looked at what you linked me but i still dont see what i did wrong

onTriggerEnter2D must be changed to OnTriggerEnter2D - Capital O. To C# they are as different as naming the method neverActuallyCallThisBecauseWhatever2D and expecting it to work. C# is case sensitive.