Yeah, it's a variable thing
To do it; first, create a variable with the name of something like %uuid firstjoin, %uuid will automatically be replaced with the player's uuid and we use uuid instead of name so it works even if the player changes their name. and shift-right click with the variable to set it to Saved (so it saves even when the player leaves). Now on player join event, place an If Variable =, in the 1st slot put the variable and in the 2nd slot put a number 0, between the pistons put the code for the first join and a Set Variable = to set the variable to 1 so the If Variable won't run when the player joins again. You can place an Else after the If Variable if you want a code that runs if it isn't their first time.