How to update a Minecraft server safely
A new Minecraft release lands, your friends' games update overnight, and suddenly nobody can join the server. Updating is the fix, and it is usually quick. It is also the one routine job that can cost you a world if you rush it, because a world that has been upgraded cannot be taken back to the old version.
Decide whether to update yet
On a vanilla server with no plugins or mods there is little reason to wait. With plugins or mods, the server software and every add-on have to support the new version first, and that can take days for small updates and weeks or longer for big ones. Your players do not have to update to keep playing in the meantime: the Minecraft Launcher lets each of them pick the server's version under Installations.
Never move a world you care about to a snapshot or pre-release. They are test builds, and a world they open may not load in the full release that follows.
Step 1: back up, and keep a copy
Stop the server, or make sure it has saved, and take a full backup of the server folder, not just the world. Keep one copy somewhere other than the server. If the update goes wrong, this backup is the only way back to the old version, because the old game cannot open the upgraded world.
Step 2: check every plugin and mod
Go through your add-ons one by one and check that each lists the new version. Plugins that only use the standard plugin interface often carry over, but those that reach deep into the game usually need a new release. Mods almost always need a build made for the exact new version, and so does the mod loader itself. Note any that are not ready: you can wait for them, or remove them and accept losing what they added. The plugins and mods guides cover where to look.
Step 3: update the server software
Replace the server software with the build for the new version. For Paper, prefer a build the project marks as stable: its first builds for a new version are often labelled experimental. Then put the matching versions of your plugins or mods in place, so the server never starts the new version with old add-ons.
Step 4: start it and watch the log
The first start on a new version takes longer than usual, because the server upgrades the world's data as it loads. Let it finish. Read the log for add-ons that failed to load, then join and look around your main builds, your farms and anything a plugin or mod managed. If something is badly wrong, stop the server and restore the backup from step 1, rather than trying to repair the upgraded world.
Step 5: tell your players
Java players need the same version as the server to join. The launcher's Latest release option follows new releases automatically. On a modded server, everyone also needs the updated mods, so share the new mod list or modpack version before you reopen. Some servers add a plugin such as ViaVersion so players on newer game versions can still join an older server, which is handy while you wait for your add-ons.
New terrain needs new chunks
An update keeps the land you have already explored as it was. New biomes, structures and ores from the update generally appear only in chunks generated after it, so you may have to travel past the edge of your explored area to find them.
Updating on loothost
Take a backup first: Save a restore point keeps one backup that automatic rotation never removes, and any backup can be downloaded so you hold your own copy. Where your server type lets you change the version, it is a Startup value under Settings, described in the Settings docs. After you change it, restart and watch the console while the world upgrades. Moving a world between servers instead? See how to upload a world.