Auto Lightbox shows only once

I’m trying to set a lightbox to show only the first time the members login on the portal I’m developing.
If they want to open the lightbox again, they have the option of clicking of on the button on the dashboard.
However, if the lightbox opens automatically the first time, this button will become green, to show that they have already opened the lightbox.

← button before lightbox opens.

← button after lightbox closes

import {local} from 'wix-storage';
$w.onReady(function () {
  // flag is not found
 if(!local.getItem("OTlightbox")) {
    // open popup
    // set flag for future visits
    local.setItem("OTlightbox", "yes");
  else {

Can someone help me if that?