Some tips to Minecraft linux, being a linux minecrafter myself
Ubuntu doesn't have a “game mode”, nor the majority of distros out there. You have to close all applications that aren't essential while you play, and stop unneeded services. Absolutely check if there are other processes using CPU while you play (you can use the "top" command from a shell) and if the system is swapping (use “free -m” and see if the Used column in the swap line is zero or near zero).
Check if you video card needs “proprietary drivers” to have a better FPS from you video card. Sometimes the free driver has the same performance (FPS-wise) of the closed-source one (usually this is the case for AMD), sometimes you only have the open source driver (usually Intel)
Check your resolution and video settings. For example, if you desktop defaults to wayland compositor, try to launch it on Xorg (so you remove one layer, as Minecraft uses Java and runs on X) (usually you have the choice of the kind of session in the login screen). If you resolution is above FullHD (1920x1080), try to play in fullscreen mode configuring minecraft to use a lower resolution (unless you play with resource packs, Minecraft looks the same in 1080p or in 720p, so I play in 1280x720 and get serveral FPS while not capped)
Check you Java version. I play on openjdk1.8 because 1.11 is less performant on Linux.
Also post you F3 screen so we can see if there are strange things on you hardware or minecraft configuration.
Your CPU is 9 years old, and you're using Java 11. I advise you to install openjdk8 and run minecraft with it.
You can choose your java executable in the launcher in the Advanced section in the edit profile. I advise to use the alternatives system of Ubuntu instead of this because it sets up all the relevant environment variables:
You have to disable any software (including ubunbu system software) that runs along Minecraft, including system software set up by ubuntu, expecially stuff that make intense use of CPU and GPU (this unfortunately includes disk indexing and the like).
Try to play in windowed mode, have a terminal handy with top running in it, and when slowdowns happen, have a look to which processes keep use a high CPU percentage (exluding, of course, the java process running minecraft itself).
By the screenshot you posted you're playing Vanilla, it would not use more than 2GB heap. Are you sure the server is garbage collecting? The F3 screen shows 100% allocation for more than a mere instant?
How much physical ram do you have on your system? Are you sure that the system is not swapping instead?
You mention vcores, that means it's a virtual machine. How much resources the VM has doesn't really depends on how much you configure on the VM but rather how much the main host gives to the VM. It could be that the host is swapping, so your vm isn't but your entire workload (it means the minecraft server) runs from disk rather than RAM.
I would try to set your heap to 2GB and see what happens.