Switching Scenes in 2D

Alright so I finally started scripting on my own and people keep telling me this is one of the easier questions, so I have a long road ahead of me. Anyway Im trying to switch scenes in unity 2d

     void OnTriggerEnter2D (Collision2D Colider)
     if(Colider.gameObject.tag == "Player")

this script isn’t working because when I hit the object with my player I don’t switch scenes, I have the scene in my build, is Trigger is checked and it has a Rigidbody2D

What am I doing wrong?
How can I avoid this in the future?

If I’m not late to answer this, void OnTriggerEnter2D (Collider2D Colider) is the part where you need to fix. If you want a collision then do void OnCollisionEnter2D (Collision2d collision)