There is an Homebrew known issue related to side by side install of Python 3.8 / 3.9. To workaround, following commands should work for you:
brew unlink python@3.9
brew unlink python@3.8
brew link --force python@3.9
Re-opening your terminal or execute command rehash
can be required to take account the change.