The one thing to understand first
Over time tables and indexes accumulate bloat — dead tuples and empty space left by MVCC. There are two fundamentally different ways to deal with it: reclaiming space for reuse within the object (online, cheap) versus physically shrinking the object and returning space to the OS (expensive, traditionally blocking). Choosing the wrong one causes outages.
Routine VACUUM reclaims space for reuse without shrinking the file; returning space to the OS is a separate, far more expensive operation — and there is an online tool for every job, so you should never need the blocking one. Match the tool to the goal and bloat cleanup is invisible to users.
Plain VACUUM: online, but doesn’t shrink files
Regular VACUUM (and autovacuum) marks <a class="sev1-termlink" href="https://thesev1database.com/glossary/dead-tuple/" title="Dead tuple">dead tuple space reusable and updates the free space and visibility maps. It runs with a weak lock that allows concurrent reads and writes. What it does not do is return space to the operating system — the file stays the same size, with free space inside it for future rows. For steady-state churn this is exactly what you want, and it should be handled automatically by a well-tuned autovacuum.