This blog post explains how when a .Net Core website is hosted in IIS, the website code does not actually get run until the first request comes in to IIS:
https://we
If you are using IIS there is a checkbox which starts the website immediately, you can try that on IIS settings.
UPDATE: see point 6 from below article:
https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x