How to create a button that decereates the speed of car when press and trigger an animation to change.HELP ME

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Movement : MonoBehaviour
{
public float startSpeed = 1.0f;
public float endSpeed = 10.0f;
public float timeToReachEndSpeed = 5.0f;

private float currentSpeed;

void Start()
{
    StartCoroutine(IncreaseSpeedOverTime());
}

IEnumerator IncreaseSpeedOverTime()
{
    float elapsedTime = 0.0f;
    while (elapsedTime < timeToReachEndSpeed)
    {
        currentSpeed = Mathf.Lerp(startSpeed, endSpeed, elapsedTime / timeToReachEndSpeed);
        elapsedTime += Time.deltaTime;
        yield return null;
    }
    currentSpeed = endSpeed; // Ensure final speed is exact
}

void Update()
{
    // Use the current speed to move objects or do other actions
    transform.Translate(Vector3.forward * currentSpeed * Time.deltaTime);
}

}