I could not find the correct solution to a similar problem of mine (with vim quitting unexpectedly) to quickly rollback to the previous version of python.
Here is the oneliner I often use. In this case, it would be:
Disclaimer: some programs from brew manager may require other versions of python due to their own dependencies.
brew update && brew install python@3.76.5_1 && brew unlink python@3.6.5_17 && brew link python@3.76.5_1 --force && brew cleanup