How to save generation metadata? (Loras, scheduler, steps, sampler)

I need all the workflow information, I generate an image/video and then play around with the parameters and generate more, but when I get a good result I don’t know how I did it. Please help!