The only reason why Daenerys Targaryen believes that she can’t bear a child is because of Mirri Maz Duur’s prophecy. In the series, Mirri Maz Duur’s prophecy was incomplete. The whole prophecy goes like this: “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.” Because of this prophecy, Daenerys started to believe that she is incapable of having a child again, but this is not yet proven. This theory was supported when Tyrion and Daenerys were talking about her successor after she died, but then again, now that Daenerys and Jon Snow became romantically involved with each other, she might soon find out that she is still capable of bearing a child.