High memory usage isn't always problem - memory is there to be used so the OS / software uses it as a cache. It's only a problem if the OS starts killing processes because it doesn't have enough memory.
You've really given us very little information, not even "top" output, so what I've put below is a guess.
In your case I suspect you have configured PHP to have more threads available than your available memory capacity. You should make sure you haven't over-allocated memory to each PHP worker and that you don't have too many workers configured.
On Ubuntu my config is at /etc/php/7.4/fpm/pool.d/www.conf . The key entries as I've configured for my server with 512MB RAM and 1GB swap is below.
pm = dynamic
pm.max_children = 3
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 1
You can alternately use "pm = ondemand" which means no PHP workers are created until they're required. That's only useful for very low volume websites where response time isn't too important.
In your php.ini (which for me is /etc/php/7.4/fpm/php.ini) you can configure the memory limit per worker thread. This is how much memory each worker thread is given - adjust it as low as you can while your website still works. This is configured for Wordpress.
memory_limit = 128M