There are three ways I’ve known of.
1. App Store
Go to your application folder, search for Xcode and hit update. If you only see the word “open”, it means you already got the latest version of Xcode that’s available for your macOS version.
2. Apple Developer Website
Go to the Apple official developer website, log in with your developer account. Then, search for Xcode. You can even download older versions.
3. Xcodes
Xcodes is an open-source software for you to get a list of different versions of Xcode to download from. There’s an app you can download on this GitHub repo. You will need to go to the setting, enter your developer account to log in before you see any Xcodes on the list.
The special thing about this program is that you can install and run multiple versions of Xcode. For example, I have 14.2 and 15.1 with me right now. It runs like a charm. I strongly recommend it.
Note
Updating through App Store is not recommended. As you can see Xcode only got rated for 2 stars. Not because of the program itself, but the download and install using App Store is buggy.
Personally, I’ve tried using the App Store to update my Xcode two times. The first time took me a few hours to finish download and install. The second time I clicked “update”, downloaded and installed it. But it still shows and works as the old version. So I eventually used Xcodes.
Hope this helps.
Code on my friend.