Start here. This is the direct spoken answer to practice first.
Why this question matters
Many startup bugs come from treating service registration and request handling as interchangeable. The two phases cooperate, but they create different runtime objects and solve different problems.
Calls on builder.Services register dependencies, framework services, and options in the application's dependency-injection container before the host is built. For example, AddControllers, AddAuthentication, and AddDbContext describe services that later components can resolve. After builder.Build(), calls on app compose the HTTP pipeline and map endpoints. UseAuthentication adds authentication middleware to each matching request, while exposes controller actions as endpoints. Registration alone does not make middleware run or create routes, and adding middleware does not register all of its supporting services. I read startup in two phases: build the application and its dependencies, then define how requests flow through it.