How it works
The script looks up the Priority label and creates it if it is missing.
The query looks for recent messages from the selected sender without the Priority label and returns up to 50 matching conversations.
For each returned thread, the script adds the label and stars every message already in the conversation, including earlier messages from other people.