This article explains the purpose and details of "Replication - vSAN datastore storage capacity health" health check and provides details on why it will report the error.
VMware vSAN 9.1 and above
What does the 'Replication - vSAN datastore storage capacity health' Health Check do?
The protection and recovery service monitors vSAN datastore usage against the configured vSAN datastore warning threshold. When datastore capacity consumption reaches this threshold, replication is stopped and reported as an error. A warning alert is triggered when usage reaches 20% below than the configured vSAN warning threshold. At this stage, replication continues, but administrative action is recommended to prevent service disruption.
What does it mean when it is in a warning or error state?
The health check reports a warning when the vSAN cluster’s used capacity reaches 20% below than the configured vSAN warning threshold, and reports an error once it surpasses the configured vSAN warning threshold.
How does one troubleshoot and fix the warning or error state?
Firstly, ensure that all the storage is valid and that there are no missing capacity devices and ensure that the vSAN datastore capacity is what you expect it to be. And then expand the cluster by either adding more hosts or disks in each host.