How to detect when a player joins the game

My datapack needs to revoke an advancement every time a player with a certain tag joins the game. I'm using 1.21

Continue to help post