How do can i use oncollisionenter2d to check if it is touching or leaving a specific tag. then do something if it touches that tag specifically

yeah thats it. i just want to make my collisions work for jump detection

I am still somewhat new so there might be better ways, but I think you should do something like this

private bool canJump = false; // This might not work for your code, just an example for jumping 
                              // where you use a bool to see if the player can jump

private void OnTriggerEnter2D(Collider other)
    {
        if (other.CompareTag("tag"))
        {
            // Do stuff that happen on enter
            canJump = true;
        }
    } 

    private void OnTriggerExit2D(Collider other)
    {
        if (other.CompareTag("tag"))
        {
            // Do stuff that happen on exit
            canJump = false;
        }
    }

If you want something to be possible to happen while object is in the trigger, then instead of doing OnTriggerEnter use OnTriggerStay. if I understand it right OnTriggerEnter happens on the frame you enter (similar to Start()), OnTriggerExit happens on the frame you leave (Similar to OnDestroy() I guess(), and OnTriggerStay happens every single frame (similar to Update()). This means that if you want something to happen while object is in the trigger when you click something on your keyboard, you should use OnTriggerStay instead of OnTriggerEnter. I think, hopefully all this is correct.