So I created an automation rule with the following:
When: Issue created
If: Issue Type equals Epic
Then: Create a new Sub-task
And: Link issue to Trigger issue
I would assume the Trigger issue would be the newly-created issue but its not linking the Sub-task to the Epic.
Only when I change Trigger issue to Most recently created issue that it works.
Understandably, that might not always work as our project has multiple members and there might be instances where it might be linked to a different issue.