What Discord does on its own
In Server Settings, Overview, Discord can send a system message on each join ("So-and-so just arrived"). You choose the channel, not the text or the image. For a real welcome message, you need a bot.
Write the message
With AshBots, type /welcome. Choose the channel, the style (embed, card or text) and write the message. Variables are replaced on each join:
{member}: the member's mention{server}: the server name{count}: the member count{inviter}: who invited them
Add an image with their name
On the dashboard, the Welcome card tool builds the image sent with the message: an uploaded background or a gradient, the member's avatar to position, and your texts in the font of your choice. The preview updates live. The walkthrough is in design your welcome card.
Give a role on join
/autorole gives one or more roles to each new member, with an optional delay. The "restore roles" option gives a returning member back the roles they had.
Leave message and private message
The same panel sets the leave message, with a different text if the member was banned, and a private message sent to the new member. Everything is detailed on the Discord welcome bot page.