Start here. This is the direct spoken answer to practice first.
Why this matters
DbContext lifetime defines which changes belong to one unit of work and whether EF Core's non-thread-safe state stays inside one request. A poor boundary can mix unrelated work, retain tracked entities, or create concurrency failures.
I usually treat DbContext as a scoped dependency in an ASP.NET Core API. One context instance is created for the request scope and used as a unit of work for that request. It tracks loaded entities, builds changes, and saves them with SaveChangesAsync. I would not register it as a singleton because it is not thread-safe and it can accidentally share tracked state across users or requests.