The first thing to do when your server appears to be lagging is to try and isolate the cause of the lag - without knowing what is causing the problem there is no way to effectively fix or reduce it.
One of the most common causes of lag - especially on Vanilla servers where you don't think about it as much - is that the server has simply not been restarted recently.
Regular restarts will unload all of the loaded chunks that are not actively in use, which reduces the server resource usage - on newer Minecraft versions in particular this is important due to chunk loading/generation being a common cause of performance issues.
You can set up a scheduled task to regularly restart the server for you - which we recommend setting up for every 10-12 hours at the very least. There is a guide on setting up these scheduled tasks here.
Is the lag serverside or not?
With clientside lag, lowering your launchers video settings can help with this - such as disabling the sky/clouds/fog, decreasing particles and lowering the chunk view radius. Lowering the servers view-distance in the server.properties can also help as the lower this is the less chunks and entities around each player the server loads in at once that the client then has to process.
The potential causes of lag vary depending on what you are running on the server - Vanilla, Plugins, Mods etc... While we can't list all the possible causes, we will list the main ones to check for before anything else here.
The most common misconception about lag is that it is RAM based and that throwing more RAM at the server will fix it - RAM is very rarely the actual case.
A simple way to tell if low free RAM is causing problems on your server simply look at the Memory meter on your control panel. If this shoots up to 100% straight after a server restart then an upgrade to a higher package to increase the RAM is recommended - if it does not, then an upgrade to a higher RAM allocation is unlikely to make any difference to your problem (excessive amounts of free RAM does not benefit a server in any way).
Note - The Memory meter is not your servers current RAM usage (if it was then your server would crash immediately as soon as it hit 100%). It is only how much of the allocation your server has accessed since the last restart - for an accurate reading you would need to use a plugin (for example EssentialsX's /gc command).
The next most common misconception is the system specs/CPU being the issue because the CPU meter on the control panel is at 100% - this is not the case.
The CPU meter on the control panel is not accurate, it's a rough indication of your server load only - when it is at 100% (during gameplay, it will also show as 100% during startup/shut down) it is simply indicating that something running on your server is causing a spike in the server load. It also does not mean that your server has issues if it is at 100% - if your server runs fine, the CPU meter can be completely ignored - it just means if your server is having issues you can check the meter and if it is at 100% then it is telling you something is causing high load.
Common Lag Causes/Fixes on Vanilla:
Along with the above misconceptions there is also the assumption that a Vanilla server will run fine and that because you are not using mods/plugins you should not have issues - also not the case.
Vanilla Minecraft has not been "Stable" for a long time now, and is actually considered much worse for performance compared to server software such as Spigot or PaperSpigot - if you are running a Vanilla server and have performance/lag issues please read the post here on the forums in full before anything else: https://www.beastnode.com/forums/threads/minecraft-1-13-performance-issues.914/
Common Lag Causes/Fixes on Spigot/PaperSpigot etc...:
For servers running plugins any plugins that give errors in the console should be either updated to the latest release for your server version or be disabled/removed to see if it helps the issue, and if it persists when no errors are given, all plugins should be disabled to see if the issue persists without them. If it does then add them back a few at a time until the issue starts again to find the cause and remove it (report it to the plugin devs too so they can look into it and fix it if possible).
Another way to test if a specific plugin is causing issues is to run a timings report, which will help to indicate any problem plugins - you can read up on doing this HERE.
If the issue is present without any plugins then they are not the cause and it is likely either the server version itself (see above) or issues with the world itself.
To do so enter a new world name in the World box on your control panel, hit Save at the bottom of the page and restart the server (If you have MultiWorld/MultiVerse installed these should be disabled whilst testing this as they will still load every previous world ontop of the new one). Your old world will still be in the files, the World box simply dictates which folder in your server files the world is being loaded from, and if it is a name not already present in the files it will generate a new one in a folder with this name.
If the issue persists with a blank world then your world is not the issue - if it does not then your world is the problem and you would either need to restore a backup of the problem world from before the issue started, or load a new world to resolve the issue.
Unfortunately there is little that can be suggested/recommended when it comes to modded setups, as any single mod - no matter what that mod does - can cause problems if it has been coded incorrectly/has bugs (this is simply how modding works - with any game).
Unlike with plugins disabling mods is not recommended - if the world is loaded without the mods it was generated with then any blocks/items/mobs from that mod will be removed from the world when it is loaded, which can itself cause world issues.
All we can really suggest is to keep an eye on the server console for any errors to suggest specific mods causing issues, to lower the view-distance in the server.properties as suggested for Vanilla above, and to restart the server regularly.
In general performance issues should always be somewhat expected when running any form of modded game.
Misc Lag Causes/Fixes
Another common cause of lag is increasing the randomTickSpeed gamerule - by default it is 3 and it is not recommended to be changed unless you specifically need it changed, especially when increasing it as this will cause problems. You can check this with '/gamerule randomTickSpeed' and change it with '/gamerule randomTickSpeed <number>' (never set this to 0 as this will stop a lot of server activity from working, such as crop growth).