I understood your goal as follows.
You want to replace "qwertyuioplkjhgfdsfghjhgfdfgh" of =if(AB4=-2,iferror(query(Lookups!$AM$3:$AU,"select AR where AQ=1 AND AP = """&$E4&""" AND AS = """&$J4&""" ",0),hyperlink(arrayformula("
https://docs.google.com/forms/d/e/qwertyuioplkjhgfdsfghjhgfdfgh/viewform?entry.2027592121="&concatenate($D4," ",$C4)&"&entry.268434257="&$E4&"&entry.108198148=1&entry.1369475611="&$J4),"Go Chat")) with other value. There are several Spreadsheets in a folder and each Spreadsheet has several sheets. You want to reflect this for all sheets of all Spreadsheets.
In this case, how about the following sample script?
function myFunction() {
const oldId = "qwertyuioplkjhgfdsfghjhgfdfgh";
const newId = "###"; // Please set the new value.
const folderId = "###"; // Please set the folder ID.
const spreadsheets = DriveApp.getFolderById(folderId).getFilesByType(MimeType.GOOGLE_SHEETS);
while (spreadsheets.hasNext()) {
const spreadsheet = spreadsheets.next();
console.log(`Now processing at ${spreadsheet.getName()}`);
SpreadsheetApp.open(spreadsheet).createTextFinder(oldId).matchFormulaText(true).replaceAllWith(newId);
}
}
In this sample script, the Spreadsheet is retrieved using DriveApp and the formula texts of all sheets in a Spreadsheet are changed using TextFinder.