Xcode 10.1 is the last version that runs on macOS High Sierra 10.13.6.
To download and work with Xcode on macOS High Sierra 10.13.6, you must use Xcode 10.1
Notes/assumptions: you want a version of Xcode that runs on macOS High Sierra 10.13.6 (released 2017). The latest Xcode does not support High Sierra; use Xcode 10.1 or Xcode 9.4.x (Xcode 10.1 is the last that officially supports 10.13.6).
Steps