How to minimize CLS (Cumulative Layout Shift) for responsive layouts?

What are some suggestions for reducing content layout shift for responsive layouts?

From researching "Always include size attributes on your images and video elements, or otherwise reserve the required space with something like CSS aspect ratio boxes".

But with responsive layouts, the containers for images and other content change. So, do we need to reserve space for container divs, etc.?

How do you reserve space for these elements for responsive layouts?