How to make touch one frame in a 2D unity Game?

// When I put this code in, it does multiple frames at a time.
// I rather the code occur once instead of multiple times

// Thank you for you help =)

if(Input.TouchCount == 1)
 {
     if(Input.GetTouch(0).phase == TouchPhase.Began)
     {
         
     }
 }

bool touchBegan = false;

void Update() {

 if(Input.TouchCount == 1)
  {
      if(Input.GetTouch(0).phase == TouchPhase.Began && !touchBegan)
      {
          touchBegan = true;
      }
if(TouchPhase.Ended || TouchPhase.Moved){
touchBegan = false;
  }
}}

That should do it.