Unity 2d mobile game raycast only fire once C#?

Hey,guys I have a script that when the player touches the screen it fires a ray cast and if it hits an enemy it destroys it. However when the player holds their finger on the screen the ray cast fires continuously instead of just once how do I make it so the ray cast only fires once each the player presses the screen thanks

my code

 if (Input.touchCount > 0){
		
	
			

	            Vector2 dir = Vector2.zero;
	            foreach (Touch touch in Input.touches)
	            {


	                Vector3 touchworldpos = Camera.main.ScreenToWorldPoint(touch.position);
	                Vector2 touchpos2d = new Vector2(touch.position.x, touch.position.y);
	                Debug.Log(touchpos2d);
	                RaycastHit2D hit = Physics2D.Raycast(touchworldpos, dir);
	                Debug.DrawRay(touchworldpos, dir, Color.blue);
	                if (hit != null && hit.collider != null)
	                {
	                    if (hit.collider.tag == " germ one")
	                    {
	                        if (hit.collider.name == "germ purple(Clone)")
	                            Instantiate(spaltObject[2], hit.point, Quaternion.identity);
	                        if (hit.collider.name == "Germ blue(Clone)")
	                            Instantiate(spaltObject[1], hit.point, Quaternion.identity);
	                        if (hit.collider.name == "Germ red(Clone)")
	                            Instantiate(spaltObject[3], hit.point, Quaternion.identity);

							if (hit.collider.name == "green germ(Clone)")
								Instantiate(spaltObject[5], hit.point, Quaternion.identity);

	                        die.Play();

	                        Destroy(hit.collider.gameObject);

	                        Addscore.AddScore();
	                        player.transform.localScale += new Vector3(0.5f, 0.5f);
			
							



						
						
						
						if (Addscore.score % 10 == 0)
							player.transform.localScale -= new Vector3(4.5f, 4.4f);

						if(Addscore.score %50 ==0)
							
							Pluslevel();

						
				
					}
					
		
				
				else if(hit.collider.tag =="heart")
				if(playerHealth.health<3){
					heartsound.PlayOneShot(pickUpsound);
					playerHealth.health+=1;
					Destroy (hit.collider.gameObject);
				}
						 if(hit.collider.tag == "germ black"){
						if (hit.collider.name == "black germ(Clone)")
							blackgermhealth--;
							if(blackgermhealth<=0)

								die.Play();
							Instantiate(spaltObject[4], hit.point, Quaternion.identity);

							Destroy(hit.collider.gameObject);
							
							Addscore.AddScore();
							player.transform.localScale += new Vector3(0.5f, 0.5f);


						}

					}
				}
			}
		}

All this is in void Update thanks

You need some sort of boolean value that will be set and reset each time the user lets go.

So

void Update()
{
  if (Input.TouchCount > 0 && canFire)
  {
    //Other code
    canFire= false;
  }

  if (Input.TouchCount == 0)
  {
     canFire = true;
  }
}

Taking some advice from @TobiasW below I have edited my solution. This should work for you. Do note I switched the boolean value logic to make more sense.