Download multiple Xcode versions and use them by following the procedure described here. You can then use your desired version by using xcode-select --switch.
Download multiple Xcode versions and use them by following the procedure described here. You can then use your desired version by using xcode-select --switch.