I have no clue why this code does not work

The code below should increase speed based on a curve, and when in play mode, whenever I press fire 1 or fire 3 the speed should increase or decrease but debug log just says “0”, no matter how many times i click it.

{
    [Header("MetersPerSecond")]
    public float speed = 1;
    private int xToSample;
    private int y;
    public AnimationCurve speedIncrease;
    
	void Awake ()
    {
        InvokeRepeating("fiftyFPS",0.01f, 0.02f);
	}

    //fiftyFPS is called 50 times a second
    void fiftyFPS()
    {
        //left shift
        if (Input.GetButtonDown("Fire3"));
        {
            xToSample++;
            speed = speedIncrease.Evaluate(xToSample);
        }
        //leftcontrol
        if (Input.GetButtonDown("Fire1"));
        {
            xToSample--;
            speed = speedIncrease.Evaluate(xToSample);
        }
        Debug.Log(speed);
    }
}

Add an update function and call fiftyFPS() inside there.

Something like this I think

[Header("MetersPerSecond")]
     public float speed = 1;
     private int xToSample;
     private int y;
     public AnimationCurve speedIncrease;
     
     void Update ()
     {
         fiftyFPS();
     }
 
     //fiftyFPS is called every frame to get the Input from the player
     void fiftyFPS()
     {
         //left shift
         if (Input.GetButtonDown("Fire3"));
         {
             xToSample++;
             speed = speedIncrease.Evaluate(xToSample);
         }
         //leftcontrol
         if (Input.GetButtonDown("Fire1"));
         {
             xToSample--;
             speed = speedIncrease.Evaluate(xToSample);
         }
         Debug.Log(speed);
     }
 }