On Monterey, running /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" results in the same "Operation not permitted" errors when the install script tries to make directories in /usr/local/ group writable.