How do i destroy an instantiated prefab in another uhh event?

public class Detector : MonoBehaviour
{
public GameObject placement_prefab;

        void OnTriggerEnter(Collider other)
        {
            
            if (other.transform.tag == "Selector")
            {
    
                GameObject placement = Instantiate(placement_prefab) as GameObject;
                placement.transform.position = new Vector3(transform.position.x, 0f, transform.position.z);
                
                
            
            }
        }
         void OnTriggerExit(Collider other)
        {
            if (other.transform.tag == "Selector")
            {
    
               Destroy(placement);
               
                 
            }
        }
    }

how do i access the placement and destroy it in OnTriggerExit

The issue you are having here is a hierarchy and accessibility problem. In your code you are creating your placement in a function. After it leaves the function it doesn’t exist anymore so can’t be accessed anywhere else.
Try the following code:

public class Detector : MonoBehaviour
{
	public  GameObject placement_prefab;
	GameObject placement;
	
	void OnTriggerEnter(Collider other)
	{
			 
		if (other.transform.tag == "Selector")
		{
			placement = Instantiate(placement_prefab) as GameObject;
			placement.transform.position = new Vector3(transform.position.x, 0f, transform.position.z);
		}
	}
	
	void OnTriggerExit(Collider other)
	{
		if (other.transform.tag == "Selector")		
			if (placement != null)
				Destroy(placement);					
					  
		
	}
}