How to make object explode upon collision

I have box colliders in every object & I need when an object collides with another for it to explode. I already have a explosion prefab. How do I make the explosion happen when on collides with another?

Use the OnCollisionEnter(Collision) Unity event. Which will be triggered whenever another collider that fits some parameters enters or touches our collider. See this page for more details on which colliders interact with other colliders.

// will show up in inspector, attach the prefab to this field.
[SerializeField] private GameObject _explosionPrefab;
void OnCollisionEnter(Collision collision)
{
    // instace the prefab at our position and rotation
    Instantiate(_explosionPrefab, transform.position, transform.rotation);

    // then destroy the game object that this component is attached to
    Destroy(gameObject);
}