In a Blazor Server app, the default RenderMode is ServerPrerendered. When the component is rendering with the ServerPrerendered render mode, the component is initially rendering statically as part of the page.
On executing the first time, it is rendered as an MVC component directly when the page is requested and handled by “_Host” which is specified in “_Host.cshtml”.
Then the resources are loaded with the blazor.server.js script and start rendering a second time. Then the Razor pages are loaded as a Blazor component.
Note: If you are changing the RenderMode to Server, the lifecycle method executes only once.
Refer to this link for details.