The greatest joy for parents is for their children to walk in truth. And the greatest heartbreak for parents is for their children to walk in error.
God gave the solution to this problem in Luke 1:17.
The hearts of Parents and Grandparents must be turned from other things such as job and money and hobbies and entertainment to their children.
The reason Parents lose their children is because they lose their children’s hearts.
Parents must focus on turning their hearts to their children, not just because they may be sad and lonely in their old age if they don’t do this, but also because their family and family lineage may be destroyed. God says plainly that if this is not done that He will “smite the earth with a curse.”