You need MSBuild for building applications, even Visual Studio uses MSBuild for compiling applications.
However, MSBuild is a simpler way of compiling applications avoiding compiling and linking hassles because it hides these complexities. However internally MSBuild does need a compiler and linker installed on the machine you like to build on.
the error you are getting regarding cl.exe is not found because its not in your path settings, since you have installed Windows SDK that contains build tools including cl.exe, you should check the Windows SDK folder for cl.exe. Once you found that file all you need to do is to add the path in the environment variable and now you should be able to compile your c code easily. If you are not able to find cl.exe then you need to download Visual C++ Build Tools which do contain cl.exe
Following Link MSBuild - MSBuild | Microsoft Learn
] will give you precise steps to install MSBuild on envirnment that do not have Visual Studio.
You will find tons of articles with samples if you google "MSBuild"