Old version of Xcode can be downloaded at Apple Developer Downloads Page

Filter Xcode and find the specific version to download.

Below is an example of downloading Xcode 10.2.1