I am trying to install the command line tools for Xcode. When I open the installer, it says
Command line tools can't be installed on this disk. macOS version 14 or later is required
However, About This Mac says that I am running Catalina 1015.7. If I try to install Xcode from the App Store I get the same message.
Welcome to the forum.
The version reference (1015.7) you give is a bit bizarre. And you likely misread it.
You probably have Catalina which is 10.15.7 (the latest MacOS 10 version). But it is much older than MacOS 14.
Hence the message you get is logical.
Which Mac have you got, to see if it can support MacOS 14 ?