We now begin the cycle of a split kingdom and the kings who fall short of God's desire for their reing. David was a king after God's heart, but Solomon, while being blessed with the gift of wisdom, pursued the wives of foreign nations and that caused the inevitable, apostasy. God told the people of Israel a long time ago not to marry those from other religions because they would cause you to backslide and move away from him as the one and only God. Solomon did not listen to the tune of marrying 700 foreign wives and having 300 foreign concubines. You would think that this amount of influence would inevitably lead him down the wrong path, and it did.
He began accepting sacrifices and other signs of foreign gods in the land of Israel that God had established. As a result God told Solomon that his reign would be taken out of his family's hands, but not in the time of Solomon. In fact, once Solomon dies then his son rules but the kingdom is divided with him only having one of the 12 families of Israel under his reign, and that would be in Jerusalem.
So that begins the cycle of one ruler after another turning their back on God and God giving the land over to those who do not follow him. This will all eventually culminate in both the Norther Kingdom (Israel) and the Southern Kingdom (Jerusalem or Judah) being taken over and driven to a foreign land, like Babylon and Assyria. But that happens a bit later.
In Proverbs 3 we have the well known verse 5: "Trut in the Lord with all your heart and lean not on your own understanding."