Another issue may be that the Microsoft C++ compiler uses switches to determine which version of the language standard to compile. For example, if the code you are trying to compile uses C++ 20 language features, you need to pass /std:c++20 to the compiler if you are using the command line compiler. If you are using Visual Studio, then you right click your project in solution explorer > properties > C/C++ > Language and set the C++ Language Standard dropdown to ISO C++20 Standard (/std:c++20).
As others have said, w/o knowing what you are trying to compile, there is little additional help we can offer.