First Time Popup Lightbox

You welcome,

Here is a snippet code that you can use. How it works ?
Create new data set (i called it oldUsers in the code) with an item called userId, this data set will contain only the IDs of members who visited the site before, so any member id in this DS will not see the lightBox again.
Also, if the id is not there, the lightBox will be shown and the id will be added/inserted to that Dataset so that next time that id will not see the lightbox.

import wixUsers from 'wix-users';
import wixData from 'wix-data';

$w.onReady(function () {
 let user = wixUsers.currentUser;
  wixData.query("oldUsers") 
  .eq("userId", user.id)//check if the user id exist
  .find()
  .then( (results) => { 
 if(results.items[0]){ //if the user id exist
      console.log("Not the first time, hide lightBox");
      $w("#lightBox").hide();
      }
      
 else { //if the user id doesn't exist
 
 console.log("First Time => ID doesn't exist, lightBox is shown and id has been added to DB");
 
 let toInsert = { 
 "userId": user.id,
    };
    
  wixData.insert("oldUsers", toInsert) // user id added to the DS 
  .then((res) => {
 let item = res;
 console.log("inserted successfully");
      })
      .catch((err) => {
 let errorMsg = err;
      });
  }
  } )
  .catch( (err) => {
 let errorMsg = err;
  } );
 


 });

Let me know if you have any questions.

Good Luck.

Mustafa