Creating a one time only popup if subscribed

I have some code on my website that is not working and I was wondering if anyone could tell me what is wrong or what I would need to add.

So I have a popup on the page called affiliate marketing in the form of a lightbox, this popup then asks you to subscribe, I would like it so that if you have subscribed then you won’t ever see that pop up again. but if you have not subscribed it will appear if you go back to that page.

currently I have this.

popup lightbox page code: the form I have renamed getSubscribers5

import wixStorage from 'wix-storage';

        console.log("local set")

then on the affiliate marketing page where the popup appears after 15 seconds I have

import wixStorage from 'wix-storage';
import wixLocation from 'wix-location';

$w.onReady(function () {
  let alreadySub = wixStorage.local.getItem("popupSubscribed");
  if (alreadySub == "true") {

am I missing something, im not any good at coding so I have mainly got this from chatgpt helping me to change some code I have on another page that I had previously hired someone to do.

any help would be appreciated thankyou