What does Psalm 21:10 mean?
By opposing David his enemies destroyed any hope of having a posterity. The Lord will judge the enemies' descendants that undoubtedly repeat the sins of their fathers. Exodus 20:5 records the Lord's warning against those who violate His commandment about idolatry. He warns: "You shall not bow down to [idols] or serve [idols], for I the LORD your God am a jealous God, visiting the iniquity of the fathers on the children to the third and the fourth generation of those who hate me." However, the Lord promises "steadfast love to thousands of those who love me and keep my commandments" (Exodus 20:6).Verses such as this don't suggest that God punishes children for acts committed by their parents. Rather, they mean that imitating the example of prior generations is no excuse. Those who participate in the sins of their parents will be punished for engaging in those sins. Only those who turn away, in repentance, can escape this (Jeremiah 11:10; 25:5).
These verses emphasize the importance of parents modeling faith in the Lord in front of their children. Each generation tends to behave like the preceding generation. Antagonism against the Lord can easily set off a chain reaction that involves several generations and incurs the Lord's judgment.