I’ve found a very similar error reported here, with a solution that suggested:
sudo xcode-select --switch /Applications/Xcode.app
Reading around seems to suggest that somewhere down the updates line, the XCode CLI tools path was set to an incorrect one.
Also as @bibin-jaimon suggested in the comments below, I do have multiple versions of XCode on my machine (why? because of https://stackoverflow.com/a/58329901/606351).
Anyways, problem solved.