I want to move ball after touch the screen and stop the ball from moving after hitting finsh (delay by 0.5 seconds)

Here is my script to move ball forward and jump on touch but ball start moving when game start, I want to move ball after touch the screen and stop the ball from moving after hits Goal (delay by 0.5 seconds)

  public class PlayerController : MonoBehaviour
  {
    public float jump = 5f;
    public float moveSpeed = 3.5f;
    public Rigidbody rb;
    public bool cubeIsOnTheGround = true;

    void Awake()
    {
        startPos = transform.position;
    }

    private void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    public void FixedUpdate()
    {
        rb.MovePosition(transform.position + Vector3.forward * moveSpeed * Time.fixedDeltaTime);
    }

    void Update()
    {
       if(Input.GetMouseButtonDown(0) && cubeIsOnTheGround)
        {
            rb.AddForce(new Vector3(0, jump, 0), ForceMode.Impulse);
            cubeIsOnTheGround = false;
        } 
    }

Hi,
Try something like this, I removed some of your variables because i didn’t have your context. In your code leave them and see what i made different.

    private Rigidbody rb;
    private Vector3 startPos;

    private bool _isStart = false;

    void Awake()
    {
        startPos = transform.position;
    }

    private void Start()
    {

        rb = GetComponent<Rigidbody>();

    }

    public void FixedUpdate()
    {
        if (_isStart)
        {
            rb.MovePosition(transform.position + Vector3.forward * 5 * Time.fixedDeltaTime);
        }
    }

    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            _isStart = true;
            rb.AddForce(new Vector3(0, 2, 0), ForceMode.Impulse);
        }
    }

    private void OnCollisionEnter(Collision collision)
    {
        if(collision.gameObject.name == "goal")
        {
            StartCoroutine(StopWhenHitTheWall());
        }
    }

    IEnumerator StopWhenHitTheWall()
    {
        yield return new WaitForSeconds(0.5f);
        _isStart = false;
        rb.velocity = Vector3.zero;
    }