Brew - undo whatever the heck it just did for installation
Try running this command:
/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)&quot;

Source/more info: https://discourse.brew.sh/t/uninstall-homebrew-from-mac/8696

For future reference, you probably would have been better off to let it finish installing and the uninstalling it. Hopefully their uninstall script is robust enough to help. If not, you might want to ask for help on the Brew forum at https://discourse.brew.sh where Brew developers help users with issues.