instantiate one new object by colliding previous two objects

I wanna combine two objects with the same tag or name
to create one new object
but this makes two new object after collision

public GameObject newObject;

void OnTriggerEnter2D(Collider2D other){
	if (other.CompareTag(this.gameObject.tag))
		Destroy (other.gameObject);
	Instantiate (newObject, transform.position, Quaternion.identity);


That is because when you call Destroy(), it waits to the end of the frame before destroying the gameobject, letting the other one exist long enough to instantiate the newObject for the second time.

You can fix this by replacing Destroy with DestroyImmediate, which is called immediately.

By the way, you need curly brackets around your if statement, which close after Instantiate, otherwise you will instantiate an object even if two objects of different tags collide