Postgre-SQL shared buffer unable to increase

Hi Team,
Unable to increase shared buffer above 8GB in postgresql 12 DB where we have enough memory on OS and we tried to tune SHMALL and SHMMAX on OS but no luck!
Please suggest .

2023-11-03 13:58:00.159 IST [1773535] FATAL: could not map anonymous shared memory: Cannot allocate memory
2023-11-03 13:58:00.159 IST [1773535] HINT: This error usually means that PostgreSQL’s request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 35214278656 bytes), reduce PostgreSQL’s shared memory usage, perhaps by reducing shared_buffers or max_connections.
2023-11-03 13:58:00.159 IST [1773535] LOG: database system is shut down


Hello Basavraj,
Can you share the output of the below Postgres commands and free -g output from the O.S level to troubleshoot your issue further?

show shared_buffers;
show max_connections;
show work_mem;