You can download a version of Xcode compatible with your macOS version from the download center: https://developer.apple.com/download/more/
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags: