Change the background color of the whole column: JavaScript

I work on a coding task right now. Basically, I need to change the colour of the column on the data table where you stored personal information like this:

Under the “Id” you only see the column of “none”. My task is to change the white background colour to grey.

I was given the following JS code. The task specifically requires me to implement the colour change via the changeBackground() method.

function changeBackground(){
  //document.getElementById('tabelleSpalte').style.backgroundColor = 'rgb(125, 122, 122)';
  $('table > thead > tr > th > :nth-child(1)').css('background-color', 'rgb(125, 122, 122)');

function createTableRows(personArray) {
  const table = document.getElementById("tableContent");
  table.innerHTML = "";
  for(let i = 1; i<personArray.length; i++){
      const row = table.insertRow(-1);
      fields.forEach((field) => {
        const cell = row.insertCell(-1);
        cell.innerHTML = personArray[i][field];

You see that I have tried a couple of methods like nth-child, but none of them changed the colour to grey so far.

I have a very rough idea of how it does not work. The data table is fetched from I can’t edit this one as it is saved on an external server. When I display the table on my Chrome and refreshes it, the table displays different types of dataset with different names (but “none”, “undefined” stays the same).

I even tried to peek into the random user file via developer tool on Chrome, but I cannot get the exact ID that I can point to at the document.getElementById('Id').style.backgroundColor method.

I hope all this sense makes to you, any ideas or any directions much appreciated.