OnCollisionEnter wheel collider error!

Hello! I have a problem with “on collision enter”.
The script is about when my car collides, life is subtracted, but the problem is that it also detects the WheelCollider, and each time it rolls, it hurts itself because it detects the collision of the wheels and that of the Box Collider of the car.

How do I ONLY detect the BOX COLLIDER of the car?

Thank you!

using UnityEngine;
using System.Collections;

public class DestroyedCar : MonoBehaviour {

	public float crashforce;
	public float carHealth;
	public float carMediumHealth;
	public GameObject text;
	public GameObject smoke;
	public BoxCollider colider;

	void OnCollisionEnter(Collision col){
		
		if(col.relativeVelocity.magnitude > 10){ //remove this 
			
			carHealth -= crashforce * col.relativeVelocity.magnitude ; //line 1
			
		}  //remove this
		
		if ( carHealth <= 0 ){
			
			DestroyCar();
			
		}
		if ( carHealth <= carMediumHealth ){
			
			smoke.SetActive(true);
			
		}
		
	}    
	
	void DestroyCar () {

		text.active = true;
		transform.GetComponent<Car>().enabled = false;

		transform.GetComponent<Car>().WheelTI.brakeTorque = 100f;
		transform.GetComponent<Car>().WheelTD.brakeTorque = 100f;
		transform.GetComponent<Car>().CenterOfMass = new Vector3(0,0,0);

	}
}

Put all the code in *OnCollisionEnter() under this if(other.GetType() == BoxCollider){ or if (col is BoxCollider)

This should work:

using UnityEngine;
using System.Collections;
 
 public class DestroyedCar : MonoBehaviour {
 
     public float crashforce;
     public float carHealth;
     public float carMediumHealth;
     public GameObject text;
     public GameObject smoke;
     public BoxCollider colider;
	GameObject player;

	void Start()
	{
		player = gameObject;
	}
 
     void OnCollisionEnter(Collision col)
	{
	if(col.gameObject == player)
	{
         
         if(col.relativeVelocity.magnitude > 10){ //remove this 
             
             carHealth -= crashforce * col.relativeVelocity.magnitude ; //line 1
             
         }  //remove this
         
         if ( carHealth <= 0 ){
             
             DestroyCar();
             
         }
         if ( carHealth <= carMediumHealth ){
             
             smoke.SetActive(true);
             
         }
	}
         
     }    
     
     void DestroyCar () {
 
         text.active = true;
         transform.GetComponent<Car>().enabled = false;
 
         transform.GetComponent<Car>().WheelTI.brakeTorque = 100f;
         transform.GetComponent<Car>().WheelTD.brakeTorque = 100f;
         transform.GetComponent<Car>().CenterOfMass = new Vector3(0,0,0);
 
     }
 }

If you just need to prevent some Colliders from firing Collision calls on your script simply put them on a different GameObject(s).

If you need to determine if certain Collider is hitting, use:

foreach (ContactPoint contact in collision.GetContacts())
{
    if (contact.thisCollider == boxCollider)
    {
        //Do stuff
        return; //if you just need a collision fact
    }
}

kindly show the inspector and the hierarchy in which the collider and the script is present to make the problem clear.