I tried to install Xcode at the Apple Store, but I was unable to complete the purchase with the message "Xcode cannot be installed on" Macintosh HD. MacOS version 10.15.2 or later is required. "

Is the only way to upgrade the version of Mac Os or install old Xcode?
And in that case, which one should I choose?

Here is the information for my Mac.

  • macOS Catalina
  • Version: 10.15
  • MacBook Air (Early 2015)
  • Processor: 1.6 GHz dual core Intel Core i5

If i have the time, I would appreciate it if you could help me.