How do you re-add the calculated result to the Google Sheet every time you complete the questionnaire in the Google Sheet?

I used Google Forms to create a questionnaire. And I've created a formula for Google Forms responses using Google Scripts. After that I would like to re-enter the calculated result in the Google Sheet every time the questionnaire is filled out. Please let me know what you can do.