In Visual Studio, you can specify that a C/C++ project should generate assembly code output files in the project's properties.
Right-click on the project1 in the Solution Explorer and select the "Properties" command. In the popup that appears, open the "C/C++" node in the left-hand pane (tree view) and then select the "Output Files" child node. In the right-hand pane that is displayed, there is an "Assembler Output" option (which is set to "No Listing" by default). Click on that option to see a drop-down list of the various output options available and select the one that best suits you.
The following shows this display for V/S 2022 but it is similar in other versions of the IDE:

The "Assembly-Only Listing" option gives the tersest output but the "Assembly With Source Code" option is generally more useful. Also, note that the assembler code generated by the MSVC compiler can be quite arcane – especially when using high optimisation levels.
1 You can also specify the assembler output options on an individual file within a project, by right-clicking on that file, rather than on the project itself.