The last version of jq was introduced in 2018, I believe, and though written in C, macOS does not provide the same compilation environment that is present with Ubuntu, nor the same libraries. It must be installed with a package manager (snap) on Ubuntu too.
Even the macOS curl command is several revisions behind that available on Ubuntu. Lots of variables that introduce "could not execute correctly on macOS." Additionally, the default shell in Ubuntu is Bash 5, not Zsh 5.8, and if that jq source has any Bash dependencies while running, that may be the smoking gun. By your stating that your Zsh is updated, would that imply that you used a package manager to install Zsh v5.8.1, which Apple does not provide (yet) with Monterey?