Start here. This is the direct spoken answer to practice first.
Overview
The key question is whether losing or repeating the work is acceptable when the web process changes state or disappears.
FastAPI BackgroundTasks schedules a callable to run after the response in the same web process. It is suitable for small, best-effort work where the application can tolerate losing the task if the process crashes or restarts. I use a durable queue and worker when work must survive deployment, be retried, run for a long time, scale separately, or expose operational status. A background task receives stable data such as an entity ID and creates its own resources rather than using a request-owned database session.