The Startup class is executed only once during an application's lifespan, right after the web server has loaded the ASP.NET Core application.
The following screenshot shows the order of execution of the different methods in the classes involved in ASP.NET Core initialization: