How do I create an automation that assigns deal ownership when a deal stage changes?

Set up a trigger that creates a task for a user with the permission to assign deal record ownership (such as a Team Leader or Executive).