The answer to the above question is here...
https://support.google.com/docs/thread/356832818?hl=en&sjid=10003399125056233914-EU
The solution uses @Cooper code as follows:
function allsheetslist() {
var ss=SpreadsheetApp.getActive();
var shts=ss.getSheets();
var html='<table>';
shts.forEach(function(sh,i){
html+=Utilities.formatString('<tr><td><input type="button" value="%s" onClick="gotoSheet(%s);" /></td></tr>',sh.getName(),sh.getIndex());
});
html+='</table>';
html+='<script>function gotoSheet(index){google.script.run.gotoSheetIndex(index);}</script>';
var userInterface=HtmlService.createHtmlOutput(html)
SpreadsheetApp.getUi().showSidebar(userInterface);
}
function gotoSheetIndex(index) {
var ss=SpreadsheetApp.getActive();
var shts=ss.getSheets();
shts[index-1].activate();
}
@--Hyde then provides his solution to replace a section of the code with the following:
shts.forEach((sheet, i) => {
const sheetName = sheet.getName();
if (sheetName.match(/^(Sheet1|Sheet2|Another sheet|Fourth)$/i))
html += Utilities.formatString('<tr><td><input type="button" value="%s" onClick="gotoSheet(%s);" /></td></tr>', sheetName, sheet.getIndex());
});
This does exactly what I hoped it would. It enables me to specify the exact sheets I want in my sidebar.
I hope that this proves useful to others.