brew cask commands were deprecated on 2020-12-01 with the release of Homebrew 2.6.0. Starting then, all brew cask commands succeeded but displayed a warning informing users that the command would soon be disabled. The message also provides the appropriate replacement.
I tried this command, but failed. (M1 Mac mini2020, OS: Big Sur ver11.4, 16GB)
https://github.com/ansible-collections/community.general/issues/1524
brew cask
seems be deprecated.