On a computer, make a new Google Sheet (sheets.new) and name it.
Open Extensions, then Apps Script. Delete what is there.
and paste it in. Press the save icon.
Press Deploy, New deployment. Click the gear, choose Web app. Set Execute as to Me and Who has access to Anyone. Press Deploy and allow access when Google asks.