Right-click a stack (press and hold on a phone) and select Tag.
Select a tag under "My tags", or select New tag….
For a new tag, enter a name, pick a colour, optionally say what it is for, and select Create and tag.
In that dialog, Also tag future mail from adds a rule for the sender. The menu also lists Mailman's own tags, to correct wrong labels. Manage tags in Settings → Tags (250 at most). If a tag's view looks empty, widen its date range.
After five tagged stacks, Mailman can learn the pattern.
Open Settings → Tags and select Automatic tagging beside the tag.
In "Mark examples", mark stacks that belong with ✓ and those that don't with ✗.
Select Preview matches.
Correct any wrong match with ✗ or ✓ and select Re-learn. Then select Continue.
Select Turn on.
If one search rule fits all your examples, Mailman uses it and tags existing mail too. Otherwise its AI checks new mail, and Advanced sets how far back to look (30 days by default) and what to do with unsure matches. To learn, Mailman sends your examples' sender, subject and start of the body to the AI.
Pause keeps existing tags. Remove automatic tags removes the ones Mailman added. Tags you set by hand, sender rules and your examples stay, so you can turn it on again without five new ones.
Up to five tags can use the AI. A tag you remove by hand is not added back.