Start here. This is the direct spoken answer to practice first.
Why this matters
Endpoint filters wrap minimal API handlers, while MVC filters participate in the controller pipeline. Their contexts and lifecycle hooks differ even when both are used for focused cross-cutting behavior.
Endpoint filters run before and after minimal API handlers and can inspect handler arguments or the returned result. MVC filters run at controller-specific stages such as authorization, resource, action, exception, and result execution. I use the filter type that belongs to the endpoint model already in use. If a concern applies to the whole HTTP pipeline rather than selected handlers or actions, middleware is usually the clearer boundary.