Summary: it would be a "call-back" to when that aspect of Dany's character was discussed previously. But, that never actually happened in the TV show (it only happened in the books), so it's actually a "retcon". It's also an example of the Rule of Three, but in a slightly different way.
Trope for repeating some detail
Done sparingly, to remind a viewer/reader of something that happened long ago or earlier in the series, it's a Call-back:
"Remember how that happened? That didn't stop being a thing that happened or anything."
— Homestuck, (referencing an event from thousands of pages ago)
A relevant reference to an event taking place earlier than the timeline of the present story.
Done excessively, it's an example of the producers thinking Viewers Are Goldfish:
Naruto: Want me to have a flashback of what just happened 13 seconds
— Naruto: The Abridged Series
Sort of like how executives think Viewers Are Morons, they also think
you have the memory of a goldfish, which, according to an incorrect
urban legend, lasts about three seconds... With weekly television,
there is a tendency to underestimate the audience.
Tropes used in this specific Game of Thrones example
The thing being called back to didn't actually happen on-screen, so it's a "retcon" (short for "Retroactive Continuity"):
Reframing past events to serve a current plot need. The ideal retcon clarifies a question alluded to without adding excessive new questions. In its most basic form, this is any plot point that was not intended from the beginning. The most preferred use is where it contradicts nothing, even though it was changed later on.
...because in the Game Of Thrones TV show only (leaving aside the books for now), the idea that Dany can't have children is never mentioned until Season 7. Dany tells us (and Jon) that she was told this by Mirri, the magi/witch who oversaw her failed childbirth in Season 1 and who effectively killed Khal Drogo:
- DANY: I can't have children.
- JON: Who told you that?
- DANY: The witch who murdered my husband.
- JON: Has it occurred to you she might not have been a reliable source of information?
S07E07 from transcript
...but in the TV show, Mirri didn't say that.
Dany asked Mirri when Khal Drogo would recover from his stupor, and in the book A Game of Thrones, Mirri gave this open-to-interpretation answer (most relevant bit in bold):
When the sun rises in the west and sets in the east. When the seas go dry and mountains blow in the wind like leaves. When your womb quickens again, and you bear a living child. Then he will return, and not before
Dany assumed that this meant Drogo would never return, and then assumes based on this that she is infertile: that it is as impossible for her to have a living child as it would be for the sun to rise in the west, or for mountains to blow like leaves in the wind. Of course, there are a heap of theories as to what Mirri's words actually mean.
In TV show, the bit about Dany's fertility was left out:
- DANY: When will he be as he was?
- MIRRI: When the sun rises in the west, sets in the east. When the seas go dry. When the mountains blow in the wind like leaves.
- DANY: Leave us.
S01E10 from transcript
So the TV show writers had to retcon that missing bit in as if it was said off-screen. It's not the worst kind of retcon since it doesn't contradict anything that happened previously - Mirri could have told Dany this off-screen and Dany could had believed it all this time:
- Dany had never explicitly acted like someone who thought she could become pregnant after the Mirri encounter. She never talked about any sincere plans to have children, and never seemed to consider the possibility she might become pregnant from Daario.
- Dany losing the ability to have children seems like the sort of thing that might have happened during that mysterious blood-magic ritual in that tent which supposedly ended with her giving birth to a dry, dead monster.
- It seems like the sort of thing Mirri might have said to Dany. She was very negative about Dany's "monsterous" stillborn baby, and seemed proud to have prevented the birth of a boy she expected to become a terrible warlord.
But in the TV show, none of this was ever actually said on-screen.
Why repeat it three times?
You're almost certainly right that the specific pattern of repetition is also an example of the writing "Rule of Three":
Sometimes called trebling, the Rule of Three is a pattern used in stories and jokes, where part of the story is told three times, with minor variations. The first two instances build tension, and the third releases it by incorporating a twist.
The first mention is the retcon that introduces it - it's the first TV show viewers have heard of the idea, but it doesn't contradict what they've seen (so, some viewers end up thinking "How did I forget that?" instead of "Wait, where did that come from?").
The second mention cements it as being a thing that is important, and elaborates on how big a problem infertility is for someone looking to start a dynasty (building the tension).
The third releases that tension with the joke that the witch who murdered Dany's husband might not be a particularly reliable source of information (and heavily foreshadows the idea that Dany and Jon might be about to have a baby).