תָּמִים תִהְיֶה עִם ה' אֱלֹקיךָ. -- דברים יח:יג
You should be pure with Hashem, your G-d. [Devorim 18:13]
Commenting on this verse, Rashi explains that this verse is telling us the following lesson:
התהלך עמו בתמימות ותצפה לו ולא תחקור אחר העתידות, אלא כל מה שיבא עליך קבל בתמימות ואז תהיה עמו ולחלקו.
Walk with Him with pure [emunah], and yearn for Him. And don’t investigate about the future tidings. Rather, accept with pure [emunah] everything that will come upon you. Then, you will be “with Him” and “His inheritance”.
We see from here that the secret to not worrying about the future is כל מה שיבא עליך קבל בתמימות “Accept with pure [emunah] everything that will come upon you.” - i.e., If you accept now that whatever will be, will be good since it will come from Hashem, you will not worry.
Another lesson that we learn from this verse, or more specifically from the words תִּהְיֶה עִם ה', is that Hakadosh Boruch Hu wants us to walk in life with Him (Rashi’s beginning words of his comment to this verse are: Walk with Him...).
This idea is reflected in the famous words of the prophet Micha (6:8): וְהַצְנֵעַ לֶכֶת עִּם אֱלֹקיךָ—Walk humbly with your G-d.