User wrote "osx" denotes OS X 10.12 Sierra released in 2016
The moniker was re-branded " macOS " starting in High Sierra macOS 10.13 released 2017.
To download Xcode from Apple would require a Qualifying Computer to run macOS 13 Ventura .
The Age of this computer will Govern what newer version of macOS it will Qualify to install.
Use About this Mac from the Apple Icon on Desktop - the required Information will be there.
With the above information in-hand - follow this How to get old versions of macOS and verify what version this computer Qualifies to install.
Does this computer appear as Listed and qualifying for an upGrade to a newer version of macOS ?
Safari will open a redirect and open the Apple Store where the download can commence.
If Yes, suggest having at least 50 GB of Empty Space on the drive.
It will allow the Full Version ( about 12.xx GB ) to download, expand and then commence to install.
If there is Third Party Security Software installed - remove it.
It will interfere with both the download and installation process.
The below links will help identify which version of macOS this computer may Qualify to run.
macOS Sonoma is compatible with these computers
Computer Qualifying for macOS 13 Ventura
Make Time Machine Backup before doing any upDates / upGrades