A common reason for a downvote is written everywhere and in particular as the tooltip for the downvote button - "does not show any research effort". As a result, it is the first thing to check if your post shows "research effort".
One common problem demonstrated in the linked post is no attempt to search/read about the error message, which for most errors will give at least some information.
If you would search for the error like https://www.bing.com/search?q=Couldn%27t+find+a+project+to+run.+Ensure+a+project+exists+in you get decent number of articles, including Can't run code using the 'dotnet' run command in Visual Studio. "Couldn't find a project to run". Reading those probably would have removed the need to ask the question in the first place, but at least showing that you tried to search for the error message would help.
Another common problem is picking seeming random documentation/how-to guide to start learning (usually "I retyped text barely visible in some random video and it does not work", but using strange sites/documentation at the wrong level happens too). While indeed it would be nice if the overview section for .NET gives complete samples, it is not the only place for "how to start with .NET or dotnet tool and trying some other more targeted guides would be a good idea to do and include in the question.
There is another less common reason for downvotes - completely unclear why the question is asked or why it is asked on SO. The linked question reads as "this documentation is incomplete/incorrect" - SO is not the right place to report such issue (there is a link on the documentation page to leave "Feedback" as well as review existing feedback - which already had some similar complains). While probably vote to close as "unclear" would be more appropriate for such an interpretation of the question, downvoting is not wrong (as "not useful").
Not focusing on the problem with documentation may be another way to improve the question. Changing it to be more of a "how-to" question could be an option, also I don't think that would help - file names for project files in C# have not changed in 20+ years and it should not be too hard to find how to name one. For example, reading documentation on the dotnet
tool could help to figure out how to create a new console project and see what files are there.
dotnet new console
to create the example files. Probably not a great introduction for the "new to programming" audience, it seems to be geared to somewhere between "C# developer" and "previous version of .NET developer" audience.