As a novice hobbyist coder I have made some simple games such as pong, snake, tic-tac-toe using visual studio and monogame. I want to share those with a friend.
When I finish and build/release/compile (what is the correct term?) the code into .exe (not debugging) it puts it in a folder with a bunch of other files.
What are those? and can I get rid of them and put it all into 1 file? the programs I made seem too simple to have more then 1 file.
When I finish and build/release/compile (what is the correct term?)
Compiling is the process of converting your C# code into an executable. Compiling is a part of the Build process, which can also include other tasks like testing, packaging, etc.
For debugging an executable, the project needs to be built in the "Debug" configuration, which contains a lot of extra data along with your code. This extra data allows the debugger to pause and execute the source code line-by-line. When the project is ready, it is built in the "Release" configuration which is only the file/data executable you need to for your application.
... it puts it in a folder with a bunch of other files. What are those? and can I get rid of them and put it all into 1 file? the programs I made seem too simple to have more than 1 file.
Well, even if your application is simple, you are using Monogame as a dependency, which is a very sophisticated and a separate part of your project. So you can always expect those files to be there if you're building such a project.
The term you're looking for is "Packing your software". You need to create a package so that it is easy to distribute.
EDIT: Monogame has an article for this exact topic. You need to execute these commands in your console via dotnet-sdk.
You can also consider making it a UWP project which might make it slightly easy to distribute via Windows Store. Of course, you can send the generated UWP package files to your friend but it is a bit of the same problem you have with the Desktop build files.
You can package your project as a .msi installer using this Visual Studio's extension. I haven't tried this with Monogame, but it shouldn't be too difficult.
Finally, you can also compress it as a zip package. A cheap hack, but it works.