How to display text after collision?

How can I display a Text after I collided with a GameObject? I tried this:

   void OnGUI()
        {
            guiStyle.fontSize = 66;
            guiStyle.fixedHeight = 66;
            guiStyle.fixedWidth = 66;
            guiStyle.normal.textColor = Color.white;
  
      
            GUI.Label(new Rect(10, 10, 100, 20), "Score: " + score, guiStyle);
  
            guiStyle1.fontSize = 200;
            guiStyle1.fixedHeight = 66;
            guiStyle1.fixedWidth = 66;
            guiStyle1.normal.textColor = Color.white;
        }
  
        private void OnTriggerEnter2D(Collider2D collision)
        {
            GUI.Label(new Rect(10, 10, 100, 20), "Score: " + score, guiStyle1);
        }
    }

i never create a UI by script. For something like this, create a canvas and Text item in the editr so u can set active or instantiate everytime u collide.
i dont have much of experience so there might be better ways though.

I have to create it via script because it has to display “score”.