For years I would have reached for the padding-top hack to get a box with a fixed shape, such as a video frame. CSS has a property for it now.
.video {
width: 100%;
aspect-ratio: 16 / 9;
}
The browser works out the height from the width, so the box keeps its shape when the window gets narrower. It also works well for placeholders that should reserve space before an image or iframe has loaded.
Caveat: the ratio is a preference. If the content inside needs more room, the box grows and the ratio is gone, and an explicit height overrules it. Add overflow: hidden or min-height: 0 if the box must stay exactly that shape.
Further reading: MDN: aspect-ratio