Below solution worked for me on Xcode Version 26.5 (17F42):
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Run above command to force your terminal command-line tools to point directly to your latest Xcode app container.
Topic:
Developer Tools & Services
SubTopic:
Xcode