I'm trying to check when the player collides with a clone of the coin prefab, but I don't know how to reference the clone

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CoinSpawning : MonoBehaviour
{
    public GameObject coinPrefab;

    private void OnCollisionEnter(Collision other)
    {
        if (other.gameObject.name == "Coin" || other.gameObject == coinPrefab)
        {
            StartCoroutine(coinSpawn());
            Destroy(other.gameObject);
        }
    }
    IEnumerator coinSpawn()
    {
        yield return new WaitForSeconds(3f);
        spawnCoin();
    }
    private void spawnCoin()
    {
        
        GameObject a = Instantiate(coinPrefab) as GameObject;
        a.transform.position = new Vector3(Random.Range(-50, 50), Random.Range(1, 2), Random.Range(-50, 50));
    }
}

You can create a script called “CloneProperties” in wich you add only a boolean variable called “isClone” that you must add to all the coins and the prefab:

public bool isClone;

Then, to spanw the coin:

public void SpawnCoin(){

     GameObject SpawnedCoin = Instance (CoinPrefab);
     SpawnedCoin.GetComponent <CloneProperties>().isClone = true;
}

Next, add to every coin a tag called “Coin”.
Then, when the player collides with the coin only must have to check if the isClone variable is true:

    void OnCollisionEnter (Collision other){
    
        if (other.gameObject.tag == "Coin"){
    
              if (other.gameObject.GetComponen <CoinProperties>().isClone == true){
                  //What you write here will be executed when the player collides with a coin that  is a Clone
              }
        }
    }