I upgraded from Mohave to Big Sur and found that homebrew is not working any more. I installed the command line tools using the command
xcode-select --install
You should update brew;
brew update-reset