Start here. This is the direct spoken answer to practice first.
Overview
A connection pool limits concurrent database work; increasing it can move queueing into the database and make the whole system slower.
I size the pool from the database's safe connection and work capacity, divided across application replicas and other clients, then validate it under realistic load. The pool should support expected concurrent database operations, not total HTTP requests. A small bounded pool often performs better than a large one because excessive active queries contend for database CPU, locks, memory, and I/O.