Preview the expansion
Put echo in front of the pattern, or run ls on it, and read the list. Seeing the names is faster and more reliable than reasoning about what the pattern should match, especially under pressure.
Quoting stops expansion
'*.txt' is the literal text, not a list. That is the right thing when the pattern belongs to the program rather than the shell, which is the difference between grep patterns and file names.