Postgres consumes a lot of RAM (cached)
PostgreSQL isn't using lots of RAM, the kernel is using it for disk cache.

This is exactly what you want to happen. There is nothing to fix here.

"Free" RAM is wasted RAM. The best thing for a database server is for as much RAM as possible to be used as disk cache.