Background wont update the UI css in chrome extension

This is a chrome extension that supposes to change the look of a website to dark, I am storing the state of the checkbox from the popup then retrieving that in the background to to update the tab, the information seems to get stored but could not update the tab accordingly, I don’t know what I am doing wrong here

popup.js

      function save_options() {
    
    var chekboxState = document.getElementById('toggle_button').checked;
    chrome.storage.sync.set({
      darkMode: chekboxState
    }, function() {
      // Update status to let user know options were saved.
      console.log('chekc box is ' + chekboxState);
      
    });
  }
  
  
  // Restores select box and checkbox state using the preferences
  function restore_options() {
    chrome.storage.sync.get({darkMode: 'true',}, 
    function(item) {
        console.log('chekc box is ' + item.darkMode);
        document.getElementById('toggle_button').checked = item.darkMode;
       
    });
  }

  document.addEventListener('DOMContentLoaded', function () {

    restore_options();
    document.getElementById('toggle_button').addEventListener('change',save_options);
  });

background.js

chrome.tabs.onUpdated.addListener(function(tabId, info,tab) {
   
    if (changeState()){
        chrome.scripting.insertCSS({
            files: ['newstyle.css'],
            target: { tabId: tab.id }
        });
        console.log('style was put back');
    }else {
        chrome.scripting.removeCSS({
            files: ['newstyle.css'],
            target: { tabId: tab.id }
            
        });
        console.log('style was removed');
    }

    //  }   
   
});


function changeState(){
    
    chrome.storage.sync.get(['darkMode'], function(result) {
        console.log('Value currently is ' + result.darkMode);
        console.log('popup opened');
        if (result.darkMode == true){
            console.log('newstyle.css');
            // return 'newstyle.css';
            return true;
        }
        else {
            console.log('nostyle.css');
            // return 'nostyle.css';
            return false;
        }
        
    });

}

chrome.runtime.onInstalled.addListener(function() {
    chrome.storage.sync.set({
        darkMode: true
      }, function() {
        // Update status to let user know options were saved.
        console.log('chekc box is true on instalations');
        
      });
});