For the rule on creation, assuming you are using a custom field would look something like this:
You can find the Custom field ID by going to the upper right Cog icon --> Issues --> Custom Field --> look for your field and click on the name.
The other rule is a almost the same but not on issue creation but on field update. BE specially careful to copy from parent issue on the Action at the end:
And finally you can set an automation rule to run and bulk change all, but that can put some work on your instance. Let me know if this was helpul.
Welcome to the Atlassian Community!
You could create a new field for scrum-team (you can't reuse the old one, it won' work, you need a separate field), add that field to stories and sub-tasks and then have a script or automation that copies the stories scrum-team into it when the sub-tasks are created or the story's field is edited.
However, it's not that useful. Sub-tasks are a part of their parent story, not individual issues. The team of a sub-task is always the team the story belongs tobecause it is part of the story.
On top of that, sub-tasks appear on boards when their parent is on one, and as a board = a team, you can always infer the team from there.