It seems that you missed to install Asp.net Core web hosting bundle. Asp.net core is not supported by IIS by default even you can run it in Visual studio IIS express.
Besides, IIS won't register AspNetCore handler even when you install asp.net core web hosting bundle.
So please ensure you have registered the handler and asp.net core module in web.config
Of course, you can publish your application with VS web deployment tool. It will register these configuration when you publish the project.
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1