The error you are receiving means that the computer can not keep up with the processing required for the game environment. This doesn't necessarily mean that the CPU is too slow to run the Minecraft server, just that there are too many things running each tick that it can not keep up with. Minecraft has 20 ticks per second, and game events are processed each tick.
Entities, animals, players, chunk generation, flowing liquid, block entities, command blocks, redstone machines, hoppers, minecarts... all these things can contribute to the processing per tick. When there is too much, the server becomes overloaded and says "Can't keep up".
If you have been doing a lot of these things very quickly in a new server and new world, then this could be the source of your problem. But if you have a new server and new world and you haven't done anything yet, then it can mean that the Minecraft server is just not efficient enough for your computer. The Minecraft server has been noted to have become harder to process over the years.
Note, you should store and run the Minecraft server data on an SSD drive. HDDs are too slow to produce good results.
More Efficient Minecraft Server
But, you are not limited to the native Minecraft server. You can use Spigot or, better yet, Paper Spigot. These are open-source server implementations that make a more efficient Minecraft server. They also allow for plugins to be installed, but I'm not going to get into that in this response. I recommend downloading Paper Spigot.
Paper Spigot runs better than the native Minecraft server, but there are also basic optimization settings you can implement that have been documented here.
Notes On Optimization
Note that with the optimization guide by celebrimbor, the final item talks about your start file java flags. You don't need a lot of ram dedicated to the server when running a simple server. 3-4gb should be fine for you, and even a couple of friends.
The optimization guide also talks about pre-generating the map. If you are playing solo, and even with a couple friends, you may not need to pregenerate the map(s). Be aware that if you did use a plugin to help do this, the world size will get big. Depending on how much you generate, this could take several GB on your storage drive. If you do generate, the plugin listed, WorldBorder, is out of date. Use Chunky or Chunkmaster instead.
The chunks around the overworld spawn point are called spawn chunks. Normally a chunk is only loaded when you are near them, and thus things inside the chunk begin processing like hoppers, mob movement... But spawn chunks remain loaded and processing wherever you are on the server. This means that it may be best not to do a lot of tick heavy things in spawn chunks, like having a giant animal farm, hopper system, redstone machine. One thing spawn chunks are good for is if you really wanted to run command blocks that affect the entire server all the time. Aside from that use, I recommend conducting your adventures away from the spawn chunks.
Lastly, Paper Spigot (and spigot) have command tools that can help to analyze what is causing lag that results in the "Can't keep up!" error. These are called Timings. If you still have problems that can not be resolved with a more efficient server and optimization, learn how to use Timings reports. They can be hard to understand, but the Spigot and Paper Spigot communities can help you read what the reports mean. There are also alternative plugins that do this.
I hope this helps get you on a path to understanding what is going on. I know it is a lot to take in right away.