IMPORTXML into a Google Apps Script with Automatic Update

I’m trying to get a Google sheets apps script to work for an IMPORTXML I’m using.



The data fills from A1:B16

According to a script I found on web to have it auto refresh:

function getData() {
  var queryString = Math.random();

  var cellFunction1 = '=IMPORTXML("' + SpreadsheetApp.getActiveSheet().getRange('A1').getValue() + '?' + queryString + '","'+ SpreadsheetApp.getActiveSheet().getRange('A2').getValue() + '")';

  var cellFunction2 = '=IMPORTXML("' + SpreadsheetApp.getActiveSheet().getRange('A4').getValue() + '?' + queryString + '","'+ SpreadsheetApp.getActiveSheet().getRange('A5').getValue() + '")';

I don’t know what I’m supposed to be putting/replacing in that code with mine. If someone could help me to explain what I’m supposed to be changing to get it to work in my sheet/provide some examples of how one might look that would be a huge help.

I appreciate

IMPORTXML into a Google Apps Script with Automatic Update