When the command is apt update, it goes through the entire process and actually updates the packages. But when add to the command, I think it just skips over it, finishing in just 0.4s.
What happens when I run the full command:
#13 [stage-0 9/10] RUN apt update && DEBIAN_FRONTEND=noninteractive && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub > /usr/share/keyrings/chrome.pub && echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/chrome.pub] http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google-chrome.list && apt install google-chrome-stable chromium-browser xvfb -y && export DISPLAY=:1 && xvfb $DISPLAY -screen $DISPLAY 1280x1024x16 &
#13 sha256:6a8ae91c9bbe20d012cb59a8a960943fdf6a7613e493d1cad2615f288a4a7a78
#13 DONE 0.4s