See if /usr/bin/cc --version returns
Target: arm64-apple-darwin22.X.X
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
If it's close to that, everything should be good. If not sudo xcode-select --switch /Library/Developer/CommandLineTools should solve it: I'm assuming the install directory was altered during an update or abrupt uninstall.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: