Grouping related items by a canonical form is a pattern you'll see throughout Amazon's codebase. Inventory systems, search indexing, and recommendation engines all group by computed signatures. Here you sort each word to create a canonical key and group words that share the same sorted form.
Solve it on LeetCode, then check your approach in the full walkthrough. The solution runs in time where is the max word length.