Probably you have high cardinality metrics. Your probably need to shard ingestion or scraping.
Here is more info: https://github.com/thanos-io/thanos/issues/7503#issuecomment-2204020215