Changing mouse code to work with mobile touch

Hello there, could anyone help me translate the following code that works by mouse dragging to do the exact same thing only with finger touch.

if (Input.GetMouseButtonDown(0))
        {
            deltaRotation = 0f;
            previousRotation = angleBetweenPoints(transform.position, Camera.main.ScreenToWorldPoint(Input.mousePosition));
        }
        else if (Input.GetMouseButton(0))
        {
            currentRotation = angleBetweenPoints(transform.position, Camera.main.ScreenToWorldPoint(Input.mousePosition));
            deltaRotation = Mathf.DeltaAngle(currentRotation, previousRotation);
            if (Mathf.Abs(deltaRotation) > deltaLimit)
            {
                deltaRotation = deltaLimit * Mathf.Sign(deltaRotation);
            }
            previousRotation = currentRotation;
            transform.Rotate(Vector3.back * Time.deltaTime, deltaRotation);
        }
        else
        {
            transform.Rotate(Vector3.back * Time.deltaTime, deltaRotation);
            deltaRotation = Mathf.Lerp(deltaRotation, 0, deltaReduce * Time.deltaTime);
        }

I’ve tried changing the if statements to something like:

        if (Input.touchCount > 0)
        {
            Touch touch = Input.GetTouch(0);

            if (touch.phase == TouchPhase.Moved)
            {
                deltaRotation = 0f;
                previousRotation = angleBetweenPoints(transform.position, Camera.main.ScreenToWorldPoint(Input.mousePosition));
            }
        }

But I can’t make it work.
Can someone give me a helping hand with this?

Your if/else statement uses more equivalent conditions than just TouchPhase.Moved.

It looks like the equivalent TouchPhases are as folllows.

TouchPhase.Began in place of Input.GetMouseButtonDown(0)

TouchPhase.Moved in place of Input.GetMouseButton(0)

TouchPhase.Ended in place of the final else