You could use ST_ClusterDBSCAN to create a cluster with a given distance and minimal number of points. In the query bellow I create clusters of points within 1000 meters with a minimal number of two points, and in the outer query I count them:
SELECT
cluster,count(*),ST_Union(geom)
FROM (
SELECT
geom,
ST_ClusterDBSCAN(geom,1000,2) OVER () AS cluster FROM t) j
WHERE cluster IS NOT NULL
GROUP BY 1
ORDER BY 2 DESC
FETCH FIRST ROW WITH TIES;
Note: ST_ClusterDBSCAN expects the distance in the unit of the underlying SRS! As I'm using EPSG:26986, it is metres. Adjust this parameter to your SRS. Also note that FETCH FIRST ROW WITH TIES (PostgreSQL 13+) enables you to fetch the first results from the ORDER BY clause in case they share the same value. In other words, in case two or more clusters contain the same amount of points, they will all be listed. If you use LIMIT 1 or FETCH FIRST ROW ONLY you will get just one (arbitrary) record.
Demo: db<>fiddle
CREATE TABLE t (geom geometry(point,26986));
-- 100 random points over the given polygon
INSERT INTO t
SELECT (ST_Dump(ST_GeneratePoints('SRID=26986;POLYGON((4216635.436744224 3906228.6933973604,4225112.992686871 3914713.9388259286,4237223.322966506 3902640.089526773,4228720.260658542 3894129.3145975843,4216635.436744224 3906228.6933973604))',100,42))).geom;

Select the biggest cluster (with ties) with at least 2 points within a distance of 1km from each other.
SELECT count(*),ST_Union(geom)
FROM (
SELECT geom, ST_ClusterDBSCAN(geom,1000,2) OVER () AS cluster
FROM t) j
WHERE cluster IS NOT NULL
GROUP BY cluster
ORDER BY 1 DESC
FETCH FIRST ROW WITH TIES
count | st_union
-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6 | 01040000206A690000060000000101000000DEF0FA99831C5041605685812CC14D410101000000949040228D1C50418B6D583ACCC24D4101010000008441B6498F1C50414E04C49555C44D41010100000020AD7813131D50410179F7E239C24D41010100000015A4562E231D5041B07FE58158C04D4101010000009F78C907301D50414A726F118CC44D41
If we overlay the minimum bounding circle of this result set with the original data set we can better visualize the cluster area (for illustration only):
WITH i AS (
SELECT count(*),ST_MinimumBoundingCircle(ST_Union(geom)) AS geom
FROM (
SELECT geom, ST_ClusterDBSCAN(geom,1000,2) OVER () AS cluster
FROM t) j
WHERE cluster IS NOT NULL
GROUP BY cluster
ORDER BY 1 DESC
FETCH FIRST ROW WITH TIES
)
SELECT geom FROM i
UNION
SELECT geom FROM t

Further reading: