Those links look good to me and my macOS system can install it without any special setup and no errors.
Can you investigate any network filters / proxies or security software you run on top of macOS and/or try a different network to install the same way you did above?
My install goes without any errors from the US:
==> Installing opam
==> Pouring opam--2.1.5.arm64_sonoma.bottle.1.tar.gz
==> Caveats
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running:
$ opam init
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions
==> Summary
🍺 /opt/homebrew/Cellar/opam/2.1.5: 50 files, 13.6MB
==> Running `brew cleanup opam`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> opam
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running:
$ opam init
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions
me@m2 ~ % sw_vers
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224
Another easy first step would be to ask brew to retrieve the source code and compile this on your specific system.
brew install -s opam
-s, –build-from-source
Compile formula from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available.