How to make a sensitivity slider

i want to make a sensitivity slider but dont know how and want it to change the sensitivity and here is my script of the touch controls

using UnityEngine;
using UnityEngine.UI;

public class TouchControlsWithSlider : MonoBehaviour
{
    public float minX = -5f; // Minimum X-axis position
    public float maxX = 5f; // Maximum X-axis position

    private bool isTouching = false;
    private Vector2 touchStartPos;

    private Slider slider; // Reference to the UI Slider controlling the movement speed

    void Start()
    {
        InitializeSlider();
    }

    void Update()
    {
        HandleInput();
    }

    void InitializeSlider()
    {
        // Get the slider reference from the SliderManager if it exists
        if (SliderManager.instance != null)
        {
            slider = SliderManager.instance.slider;
            Debug.Log("Slider initialized: " + slider.gameObject.name);
        }
        else
        {
            Debug.LogError("SliderManager instance is null. Make sure it is properly set up.");
        }
    }

    void HandleInput()
    {
        if (slider == null)
        {
            Debug.LogError("Slider reference is null. Make sure SliderManager is properly set up.");
            return;
        }

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

            switch (touch.phase)
            {
                case TouchPhase.Began:
                    touchStartPos = touch.position;
                    isTouching = true;
                    break;

                case TouchPhase.Moved:
                    if (isTouching)
                    {
                        float deltaX = touch.position.x - touchStartPos.x;
                        float normalizedSpeed = slider.value; // Access slider value directly
                        float speed = Mathf.Lerp(minX, maxX, normalizedSpeed);
                        Vector3 movement = new Vector3(deltaX, 0f, 0f) * Time.deltaTime * speed;

                        transform.Translate(movement, Space.World);

                        touchStartPos = touch.position;
                    }
                    break;

                case TouchPhase.Ended:
                    isTouching = false;
                    break;
            }
        }
    }
}