I need my script to select more than one range. Here's an example:

This is what I want:
Snag_34ad784.png

I tried this code, but it obviously just selects the frist range then cancels the selection and selects the second range:
let sht = workbook.getActiveWorksheet();
sht.getRange("A2:C2").select();
sht.getRange("A4:C4").select();
Snag_34ad775.png

I thought I could use range areas, but it seems select is not a method of range areas. so this didn't work either:
sht.getRanges("A2:C2,A4:C4").select();
Does anyone know how I can have the script select both ranges at the same time?