Data must be managed in the way it was created, so if information was defined in a YAML, it must be modified in YAML. You can make modifications by editing within the UI, or by using GitOps.
When using the GitOps model, especially for domains catalog, each entity should correspond to a separate YAML file. Having one YAML file per entity is recommended to maintain clean and organized configuration management. Multiple YAML documents should not be included in a single file.
The exception to this rule is Custom Data. Custom Data added via the API will persist and won't be overwritten by GitOps since it's not stored in the YAML. However, be aware that if a key in the Custom Data conflicts with a key in the YAML, the YAML value will take precedence and overwrite the Custom Data on the next sync.