A 20 period moving average is the average of the last 20 bars. Its value at any moment depends on data that has already happened, so it turns after price turns, typically by a fraction of the lookback length. Every smoothing adds more.
This is arithmetic, not a flaw in a particular tool. Faster settings reduce lag and increase false signals; slower settings do the reverse. Indicators that appear to have no lag, such as the hull-moving-average, achieve it by extrapolating, which means they can be revised. See repainting.
The practical consequence is that indicators are best used for confirmation, filtering and exits rather than for anticipation. Any strategy whose backtest depends on acting before an indicator could actually have printed is measuring an illusion.
Related: repainting, simple-moving-average, confirmation-signal, lookback-period, technical-analysis