Q:

Google sheets to firebase

Im trying to get my table data to my firestore app but such error
keep showing : TypeError: Cannot read property 'getLastRow' of null (line 14, file "Code")
Ive done all configuration and I added firestore library to app script
function covidFunc() {
   const email = "myproject@appspot.gserviceaccount.com";
   const key = "-----BEGIN PRIVATE KEY--------END PRIVATE KEY-----\n";

   const projectId = "my project id";
   var firestore = FirestoreApp.getFirestore (email, key, projectId);
  
  
  // get document data from ther spreadsheet
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var sheetname = "US-covid";
   var sheet = ss.getSheetByName(sheetname); 
   // get the last row and column in order to define range
   var sheetLR = sheet.getLastRow(); // get the last row }

  [1]: https://i.stack.imgur.com/4Nw6k.png

A:

Your active spreadsheet file; the one that your google apps script project is attached to, should have a tab/sheet with the name: US-covid.  Your screenshot just provides a spreadsheet file with the name US-covid.  But a tab/sheet should have it. 
Example:

