The bot has no live connection to Discord, so it cannot see the moment somebody joins. Instead it checks the member list every few minutes and greets anybody new since the last check, so welcomes arrive within about five minutes of joining, not instantly.
Reading the member list needs the Server Members intent; it has to be enabled for the bot in the Discord developer portal (Bot → Privileged Gateway Intents). If it is off, every check fails and the failure shows in the activity below. Saving here also checks it and warns you straight away.
Switching this on never greets the people already in your Discord: the first check just memorises who is there, and only members who join after that are welcomed.
{user} becomes a mention of the newcomer and {guild} your
guild's name. An empty box uses the message shown as its placeholder.