Whether you need an older version to maintain a legacy project or a beta release to test upcoming features, downloading a specific version of Xcode requires going beyond the Mac App Store, which only offers the most recent stable release. Method 1: The Official Apple Developer Portal
The most reliable way to get any specific version of Xcode—all the way back to version 1.0—is through the Apple Developer website. You do not need a paid developer membership; a free Apple Account is sufficient. how to download a specific version of xcode
Where can I download old versions of Xcode? - Stack Overflow Whether you need an older version to maintain