What are the standard C++ features and utilities for querying the properties of the hardware or operating system capabilities, on which the program is running?
For instance,
how do you detect how much RAM the computer has, or how much RAM the process is using, or how much disk space is available to write to in a certain directory, or how much L2 cache is available?
You don't. Precisely none of this is the purview of the C++ language, which describes an abstract machine.
The only reason it tells you the number of cores available is because otherwise its multi-threading model would be close to useless, and even then it does so in an abstract way ("hardware concurrency" is not "number of physical CPUs in your desktop PC").