This is another example of using Automated Actions. This will create a task on an existing project when a Sales Order is confirmed.
Enable Developer Mode and navigate to Settings / Technical / (Automation) / Automated Actions:
Data to Write:
This is a very simple example and it can be adapted quite easily.
Also, Odoo already has standard functionality to create projects or tasks for service items, and that may be a simpler way to achieve the same thing.