Here the word "nations" represents the people in the nations. Yahweh asks this question to scold the people of Judah. Alternate translation: "Ask the nations if any of them have ever heard of such a thing as this." or "Nowhere on earth has anyone ever heard of such a thing like this." (See: [[rc://en/ta/man/jit/figs-rquestion]])
It was common to refer to nations as if they were women. Yahweh speaks of Israel being pure and faithful towards him as if she were a virgin and of Israel being unfaithful to him as if she had "committed a horrible act." Alternate translation: "Israel, who is like a virgin, has done something horrible" (See: [[rc://en/ta/man/jit/figs-personification]] and [[rc://en/ta/man/jit/figs-metaphor]])