How to save all the information obtained from a loop?

Hi thanks for your time. Is it possible for you to use the data frame in the referred query? I am also using the same code that has been used in the referred query.

(I am referring you to that question because it is really difficult to create a reprex of my data. As, I am working with a very complex data)