Here's a GAS script to find all the ID's of a Google Form.

The ID's are written to a spreadsheet.

This is a rewrite of this script t

function formQuestionID(){

var ss = SpreadsheetApp.getActive();
var config = ss.getSheetByName("ConfigFile");
var form = FormApp.openByUrl(
    'https://docs.google.com/forms/d/YOUR FORM ID/edit'
    );
var items = form.getItems();

var list = [];
  list.push(['Name','ID']);
  
for (var i in items) { 

  var row = []
    row.push(items[i].getTitle(),items[i].getId())
    list.push(row);
  //Logger.log(items[i].getTitle() + ': ' + items[i].getId());
 
}
config.getRange(1,1,list.length,list[0].length).setValues(list);
}