I followed the instructions https://opam.ocaml.org/doc/Install.html and ran the shell opam installer without any issues.
I strongly recommend installing opam through scoop.
scoop install opam
opam init
opam switch create 4.14.0
opam install dune
Install the dependencies first
opam install yojson
opam install ctypes
opam install ctypes-foreign
dune exec
Windows 11
Debian Trixie
Raspberry Pi 5