I would update comment from Rickfdalton, so the latest up to date version for executeScript will look like
const fromPageLocalStore = await chrome.scripting.executeScript({
target: { tabId: tab.id },
function: (key) => localStorage[key],
args : [ key ],
});