Though the fig tree should not blossom And there be no fruit on the vines, Though the yield of the olive should fail And the fields produce no food, Though the flock should be cut off from the fold And there be no cattle in the stalls, Yet I will exult in the Lord , I will rejoice in the God of my salvation.
Habakkuk 3:17-18 NASB
https://bible.com/bible/100/hab.3.17-18.NASB
This is from John Mac comments on this verse. It says it better than I could.
If everything that was normal and predictable collapsed, the prophet would still rejoice. Obedience to the covenant was a requisite element to the enjoyment of agricultural and pastoral prosperity ( Dt 28: 1– 14 ). Though disobedience would initiate the covenant curses ( Dt 28: 31– 34 , 49– 51 ), the prophet affirmed his commitment to the Lord; his longing and joyful desire was for God Himself.