In what context are you running yarn install? I don’t believe the CLI (where you’ve opened this issue) uses yarn. Did you mean to put this in a different category?
The solution is in the instructions of the track.
If you run corepack enable, you should no longer see this issue.
Having a global yarn version at 1.22.22 is fine as yarn set latest will locally (in a project folder) install higher versions using that global version.