As I commented above, Homebrew got rid of the switch command entirely, which is why it says “Unknown command”.
But rbenv provides a tap that you can install openssl from. You can run the command below:
brew install rbenv/tap/[email protected]
If you’re installing [email protected] for Ruby purposes, this thread tells you how to do that as well. For example:
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])" RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])" rbenv install 2.7.2