If 2 Object touch each other ,should be trigger or collision?

If 2 Object touch each other ,should be trigger or collision?
i write like this

void OnTriggerEnter(Collider col)
    {
        if (col.tag == "GameBox")
        {
            col.transform.rigidbody.constraints = RigidbodyConstraints.FreezePositionZ;
            col.transform.rigidbody.constraints = RigidbodyConstraints.FreezePositionY;
            col.transform.rigidbody.constraints = RigidbodyConstraints.FreezePositionX;
            AddScore();
        }
    }

GameBox is the collider tag,
GameObject A GameObject B also is GameBox tag,
but din’t have any respon,
how?

OnCollisionEnter(Collision col)
col.gameObject.tag

you add to attach a RigidBody to the 2 cubes to get the result

if more than 2 gameobject than same name touch up and up of the gameobject?
also same?

1379878--70146--$Untitled-1.jpg

1379878--70144--$Untitled-1.png

same tag not name

Ya, i have put same tag,
but it just work for gameobject a b,
for gameobject c, it not working already.
How?