Destroying assets is not permitted to avoid data loss

I Want to create a life system, at the time when a player takes damage is deducted his life. Unfortunately, when I want to remove the heart gets the message: Destroying assets is not permitted to avoid data loss.

Code:

    public int lifeValue = 3;

	public Transform heartLife1;

	public GameObject heart;


	void Start ()
	{

		Instantiate(heart, heartLife1.position, heartLife1.rotation);
	
	}


	void Update () {
	
		if (lifeValue == 2)
		{
			Destroy (heart);

		}

	}

void OnTriggerEnter (Collider other)
	{

		if (other.tag == "Player")
		{
                      lifeValue -= 1;
		}

You’re killing your prefab instead of the instance that was created, you may want adjust to keep a temporary variable for your instantiated version:

 public int lifeValue = 3;
 public Transform heartLife1;

 public GameObject heartInstance; // an instance of heart the prefab attached
 public GameObject heart;

 void Start ()
 {
     heartInstance = (GameObject)Instantiate(heart, heartLife1.position, heartLife1.rotation);
 }

 void Update () {
 
     if (lifeValue == 2)
     {
         Destroy (heartInstance);
     }
 }

 void OnTriggerEnter (Collider other)
     {
         if (other.tag == "Player")
         {
                       lifeValue -= 1;
         }
      }