problem with GetAxisRaw (using joystick trigger)

Hello. I am a complete newbie with joysticks and faced a weird problem. I want to bind the right trigger of the joystick to the primary attack. I took my script that worked great with joystick buttons and changed GetButtonDown to GetAxisRaw.
Now When I hit the trigger, I got the desired result, but not everything is so smooth. If you look at my script, you will see that if the ammo runs out, then the sound corresponding to that should be played.

    if ((Mathf.Round(Input.GetAxisRaw("PrimaryAttack")) < 0) && Time.time > nextFire)
    
                {
    
    
    
                    if (currentAmmo > 0)
                    {
    
                        foreach (var shotSpawn in shotSpawns)
                        {
                            nextFire = Time.time + fireRate;
    
                            PoolManager.Pools["PlayerWeapon"].Spawn(bullet, shotSpawn.position, shotSpawn.rotation);
    
                            currentAmmo = currentAmmo - 1;
                            weaponSlider.value = currentAmmo;
    
    
    
                        }
    
                    }
    
                    else
                    {
                        if (!outOfAmmoSound.isPlaying)
                            outOfAmmoSound.Play();
    
    
    
                    }
    
                }

But in fact, this sound is played every time I hit the trigger. The impression is that there is no check for ammo at all. This sound is always played (there is ammo or no ammo). It does not play only if part of this script is completely removed. Can anyone tell me what could be wrong? I complitely dont understand what is goin on:(

You can add another sound and add [newSound].Play() below the if(currentAmo > 0) statement to check whether [newSound] or the outOfAmmoSound will be played.

thank you for the answer. I have found what was wrong.
I had two different attacks tied to one trigger. The second weapon had no cartridges and it gave that sound. Sorry and thank you again