How do I match a div height to it's width when using percentages

But it’s important to set elements within this Div to relative or absolute. So that the size of the Square does not change.

Oh, I just heard about aspect-ratio CSS { In Real Life } | Aspect Ratio is Great