Where to put the script and how to arm it
Open your Google Form, click the three-dot menu in the top-right, and choose Script editor. Paste the code into the editor, replacing YOUR_FORM_ID_HERE with your form's ID (the long string in the form's URL between /d/ and /edit). Set DEADLINE to the exact date and time you want the form to stop.
Save the script, then run scheduleFormClose() once from the editor toolbar. Apps Script will ask for permission to manage your forms and triggers; grant it. That single run registers the one-shot trigger and exits. You do not run scheduleFormClose() again.
The trigger calls closeForm() automatically. You can verify it was created under Triggers (the clock icon in the left sidebar) — you should see one entry pointing at closeForm with a time-based type.