how to stop music when something happens in unity code example
Example: stop sound in unity
audioSource.Play();//Start playing
audioSource.Stop();//Stop playing
audioSource.Play();//Start playing
audioSource.Stop();//Stop playing