Based on the automation rule that Jira Cloud offers by default in its gallery of automation templates to link incidents mentioned by comments as well:

I need a similar automation that checks all existing incidents in the organization for matches on a numeric custom field. The custom field corresponds to a 4 digit field. This automation is supposed to work as follows:
- An issue is created
- Checks the custom field: {{customfield_10115}} in all projects.
- Links together all requests containing matching result in field 10115.