Flexbox as a base layout is convenient but tricky due to or “jank”. If the dimensions of the base flex container(s) are ambiguous, then the browser constantly recomputes the dimensions as streams in.
My favorite trick is to give the browser dimension hints and avoid computational
Set as many dimensions (width/height) as possible unambiguously. My Internet
speed is sufficiently slow enough that I can see layout shifts in many sites,
including my own (this micro blog).