This is a long-standing issue. But I realize I haven't communicated it so perhaps it could be tracked ...
The following takes a little over 10 minutes on GitLab SaaS Windows hardware (almost same timing on my desktop):
opam repository set-url default https://opam.ocaml.org --yes --all
Ditto for opam init.
Job: https://gitlab.com/dkml/distributions/dkml/-/jobs/5608126061 (search for repository set-url default)