I know Xcode is installed because (1) I can launch it and (2) App Store offers to update it and successfully does so.
But every time I launch it, it asks me to install the command-line tools with a GUI pop-up, and makes no complaint of error when I OK that.
brew keeps saying
xcode-select --install but if I try it it complains
xcode-select: error: no developer tools were found, and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.
It does NOT offer the GUI pop-up mentioned in the answer to Installing Xcode Command Line Tools