Hey there, there is quite a few ways of doing this but the way I recommend most is using Skript because it has the most customization. Download the Skript plugin (here) and then restart your server. After restarting go to "File Manager" (here), then click "Plugins", then the "Skript" FOLDER, then "Scripts", create new file
name it something like "joinmessage.sk" then open it.
Paste this into it
on join:
set join message to "JOIN MESSAGE HERE" # Use %player% for the player's name, %player's display name% for the player's prefix, name, AND suffix
on disconnect:
set leave message to "LEAVE MESSAGE HERE" # Use %player% for the player's name, %player's display name% for the player's prefix, name, AND suffix
Then do /sk reload (name of file without .sk)