Making the player spawn in a Lobby

Hi, I’m trying to make my datapack so that when a player spawns into a world for the first time. I have a few ideas where you add a score or give an advancement to a player then teleport them to a lobby but im just wondering if theres a better way to do this. Thanks

Continue to help post