How to build a story with a list in the description

How to find the title and number of each “epic/story/task” that has a label of “S1” or “S2” and “v22.7” and generate a story “v22.7” That story, will have its description pre populated the list with the titles found.
If story title "v22.7 already exists then update the description field.