Currently, the VS item templates, and the documentation suggest using app.UseEndpoints for route registration in ASP.NET Core.
It would be better to use top-level route registrations like app.MapControllers() and app.MapControllerRoute() directly.