Moses wrote the words, “Be sure your sins will find you out” (Numbers 32:23). King David is an example of God fulfilling His word in the matter of our sin. Please read 2 Samuel 12 – 14.
And Nathan said to David, “Thou art the man. ‘Thus saith the LORD God of Israel, ‘I anointed thee king over Israel, and I delivered thee out of the hand of Saul; and I gave thee thy master’s house, and thy master’s wives into thy bosom, and gave thee the house of Israel and of Judah; and if that had been too little, I would moreover have given unto thee such and such things. Wherefore hast thou despised the commandment of the LORD, to do evil in His sight? Thou hast killed Uriah the Hittite with the sword, and hast taken his wife to be thy wife, and hast slain him with the sword of the children of Ammon. Now therefore the sword shall never depart from thine house; because thou hast despised Me, and hast taken the wife of Uriah the Hittite to be thy wife.
“‘Thus saith the LORD, ‘Behold, I will raise up evil against thee out of thine own house, and I will take thy wives before thine eyes, and give them unto thy neighbour, and he shall lie with thy wives in the sight of this sun. For thou didst it secretly: but I will do this thing before all Israel, and before the sun.'”
And David said unto Nathan, “I have sinned against the LORD.” And Nathan said unto David, “The LORD also hath put away thy sin; thou shalt not die.” Howbeit, because by this deed thou hast given great occasion to the enemies of the LORD to blaspheme, the child also that is born unto thee shall surely die.
2 Samuel 12:7-14