When people seek solution to their problems outside God, they end up failing, even if it sometimes seems that they were solved initially.
God said in Psalm 50:15 that you should call on Him in the day of trouble and He will answer.
Ensure that you are close to God before the day of trouble comes, so that He will listen to you when you call. Sin can stop Him from hearing a person's call. (Isaiah 59:1)
“Live holy so theat in the day of trouble, when you call on God, He will hear you. Evertyhing else may fail, but Jesus never fails.”
Memorise: My flesh and my heart faileth: but God is the strength of my heart, and my portion for ever. (Psalm 73:36)