You don’t show your code, nor identify the .net version. so we can only guess. See rules for defining Main and determine which one you broke, though you appear to have defined the class Program twice.
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/main-command-line