How to optimize memory and speed?

I have a new installation with some websites. I migrated from CentOS with VestaCP to Debian 11 with HestiaCP.
I am very happy with the end result but it seems that my websites respond slightly slower than before.
However, it is on the same VPS server (5Gb ram).
How can I optimize the use of memory and the speed of the initial loading of the websites?
I know this is a complex question but maybe there are some best practices for HestiaCP?

What is your setup? Nginx / Apache or Nginx only? Wordpress, other cms?

It is a basic setup with Apache and Nginx.
Websites are only wordpress. That’s about it.

It’s very little information to help you… speeding up WP can be very case dependant. In general I have the same setup with Nginx proxy. I feel I almost never need any additional caching plugins for my custom-build installs with as little plugins as possible. In some cases I use Cloudflare with a caching plugin.
The best thing to do is to analyse your websites to find the cause of the slowing down. Test your sites with:, and the likes…

You can have 100 wordpress sites running in a machine or even 2 woocommerce sites running in that machine.

The optimization has nothing to do in this cases.