Sefer Shmuel (the Book of Samuel) explains Michal’s childlessness as a consequence of her inappropriate scolding of David, but if you think about it, Michal HAD to end up childless. God, through his prophet Shmuel, had already taken the kingship from Shaul’s line for his failure to destroy Amalek. At the same time, David was already married to Michal, Shaul’s daughter, and had sworn to preserve Shaul’s line (implying having children with her.) If Michal were to have a child, this child would have been a descendant of Shaul but still part of royalty, violating God’s curse. So the only way for both David and God to keep their contradictory promises was for Michal to be barren.