Unthankfulness or not remembering what God has done comes from focusing on what you don't have. Unthankfulness is fuel for complaining and worry. Lack of gratitude ultimately gets you to a place where you limit God and wander around life for years
Gratitude, thankfulness and remembering what God has done builds confidence and inspires faith to walk in grace, which is his power. What will you put in place in your life the ensure you don't forget what God has done and you remain thankful? When you find yourself asking "Can God prepare a table for you in the midst of your trouble?", wondering if your needs will be met, or having these kinds of doubts, it's an indicator that unthankfulness may have crept in.
When we hear these kinds of things coming from our hearts, put your mind on this truth...
Psalm 23:5 You prepare a table before me in the presence of my enemies. You anoint my head with oil; my cup overflows. 6 Surely your goodness and love will follow me all the days of my life, and I will dwell in the house of the Lord forever.