You would like to use a specific Yarn version in your builds, but this version might be different than the default on Bitrise.
On the MacOS stacks Yarn is installed via brew, so if you need the latest version, you can upgrade using brew command:
brew upgrade yarn
If you need a specific Yarn version, you can switch between versions using
brew switch yarn VERSION_NUMBER. If you are unsure, you can then verify the versions available to homebrew by running:
brew list --versions yarn.