1 Chronicles 28:9
9 “As for you, Shlomo my son, know the God of your father. Serve him wholeheartedly and with desire in your being; for Adonai searches all hearts and understands all the inclinations of people’s thoughts. If you seek him, he will let himself be found by you; but if you abandon him, he will reject you forever.
Though David was challenging his son Shlomo (Solomon) to always trust and search after Adonai, it is the same for us. If we seek after Him, He will come to us, if we ignor Him, He will abandon us to death.