Touch movement on drag only with speed

I’m completely lost so I hope someone can help me.
I’ve got a 2D level, I need the player to move left and right only by dragging. How do I do this without teleporting and with a set speed?
This is the first time I’m attempting touch controls, I’m still quite new to unity and I’m just not getting it. I’ve spent the majority of the day looking at questions and watching videos, I’m still no closer to figuring it out. I’ve tried different things with no luck, I’m finding it hard to understand.
I’ve attached what I have at the moment, this drags left and right but does nothing with speed, if I touch a different part of the screen the player will just teleport there.
Any help would be much appreciated.
public float moveSpeed;

       void Move()
            {
                if (Input.touchCount > 0)
                {
                    if (GameManager.instance.speedUpPressed == true)
                    {
                        Vector3 screenPos = Input.mousePosition;
                        screenPos.z = 10.0f;
                        Vector3 worldPos = Camera.main.ScreenToWorldPoint(screenPos);
    
                        Vector3 newPos = transform.position += Vector3.right * moveSpeed * 1.5f * Time.deltaTime;
                        newPos.x = worldPos.x;
                        transform.position = newPos;
                    }
                    else
                    {
                        
                        {
                            //inputX = Input.touchCount;
                            Vector3 screenPos = Input.mousePosition;
                            screenPos.z = 10.0f;
                            Vector3 worldPos = Camera.main.ScreenToWorldPoint(screenPos);
    
                            Vector3 newPos = transform.position += Vector3.right * moveSpeed * Time.deltaTime;
                            newPos.x = worldPos.x;
                            transform.position = newPos;
                        }
                    }

@Brosiscreations
Hi, The bread is here.
There are many ways to get the player to move towards the inputted location.
The first method is to use the built in unity methods that automatically moves objects to the location. This would include the Vector3.lerp and Vector3.MoveTowards methods.

So, here the code would look like this:
Make sure to create a new float or variable that is the speed

transform.position = Vector3.Lerp(transform.position, newPos, speed * Time.deltaTime);
transform.position = Vector3.MoveTowards(transform.position, newPos, speed * Time.deltaTime);

However, I am assuming that you only want the player to move left and right by dragging left and right. The way you do that is by getting the distance of the Input.X direction subtracted by the vector of the player. Once you do that, then you can determine how far ahead the input location is in front or behind of you.

Set a float in update to the value of Input.x - Player.position.x, to something for example, MovementDirection.

MovementDirection = Input.x - Player.position.x;

With that float you have the options to make the movement gradual based off its value or a discrete value:

What I mean:

rb.velocity += new vector3(MovementDirection * Time.fixedDeltaTime, 0,0);

Or:

    if(MovementDirection > 0){
    rb.velocity += new Vector3(MovementSpeed * Time.fixedDeltaTime, 0,0);
    }
    
    if(MovementDirection < 0){
    rb.velocity += new Vector3(-MovementSpeed * Time.fixedDeltaTime, 0,0);
    }

I hope this helps! Good luck programming!