Leviticus 20:21

And if a man shall take his brother’s wife, it is an unclean thing: he hath uncovered his brother’s nakedness; they shall be childless.

Cross-reference

Leviticus 18:16 prohibits uncovering brother's wife's nakedness — the very sin penalized here with childlessness.

Matthew 14:3 Historical context

Matthew 14:3 records Herod taking his brother's wife — an example of the sin punished here.

Matthew 14:4 quotes John's rebuke that it's not lawful — directly referencing the law here.

Mark 6:18 Citation

Mark 6:18 records John's same rebuke — it is not lawful to have brother's wife, citing this law.