Run a script in multiple google spreadsheets

I have 40-50 different google sheets (each sheet is for a different person) and I collect the data from all those sheets.

I want to add some functionality to all those sheets by running a script. Right now, I have to open each and every sheet one by one and manually write a different script for all those spreadsheets.

I have a script with me and I want to run this script on every sheet.

My question is how do I write a script which will allow me to trigger in every google sheet.