For the project you linked to, they used Airtable to store a list of words and a series of images. So when you type in a word, it searches Airtable for that word and if a match is found, it displays the image that is stored in Airtable. So you would need to store all possible words and all possible images in a database. It could be done locally in the app as a table/database or in the cloud using Airtable (recommended) or Google Sheets (which would require you to store the photos elsewhere such as in Cloudinary).
The loop they used was increasing the row number in Airtable in order to loop through all possible row values. When you have a loop, you usually use the loop variable (in that screenshot, “i”) within the blocks somehow. That was missing from what you posted above.
This is a beginner/intermediate project in Thunkable. Expect to spend a few hours re-creating this if you are new to Thunkable.