`xcode-select --install` is all I've ever used. But I suppose it requires an Apple Account to download XCode from the App Store.
yeah but there's some hope https://xtool.sh/documentation/xtool/
You cant even get the Apple account without a phone number.
But Apple is beloved on HN and Oracle is hated so...