localscale not working

I am trying to scale a prefab after its instantiated but the scale just doesn’t get changed and I don’t get any errors either.

here is my code:

IEnumerator spawnBird1()
	{
		wait = Random.Range (5f, 10f);
		yield return new WaitForSeconds (wait);
		Debug.Log ("spawn1");
		Vector3 spawnPosition = new Vector3 (-50f, Random.Range (8f, 25f) ,8f);
		Instantiate (Bird, spawnPosition , Quaternion.identity);
		Vector3 scale = Bird.transform.localScale;
		scale.x = 2f;
		scale.y = 2f;
		index = Random.Range (1,4);

		switch (index)
		{
		case 1:
			StartCoroutine ( spawnBird1() );
			break;
			
		case 2:
			StartCoroutine ( spawnBird2() );
			break;
			
		case 3:
			StartCoroutine ( spawnBird3() );
			break;
		}

	}

Please write

Bird.transform.localScale = new Vector3(2f, 2f, Bird.transform.localScale.z)

The line

scale = Bird.transform.localScale;

copies value Bird.transform.localScale to new variable scale. So if we change scale’s x & y, it will not affect to Bird.transform.localScale