The term is metonym. It is when you use a characteristic or associated attribute of a thing as the name of that thing. A classic example would be "the crown" when talking about the monarch or "The Whitehouse" when talking about the president.
Oo, I got a bonus word! I spent way too much time trying to parse synecdoche from metonym.
Apparently, synecdoche is something associated with, and metonym is a whole or a part of
of. So "red hats" and "trust funds" referring to people are synecdoche and my examples were all metonyms.
A book you'd probably enjoy is "Elements of Eloquence", by Mark Forsythe. It covers this kind of stuff in a fun, accessible format. Like how John F Kennedy's "Let us never negotiate out of fear, but let us never fear to negotiate" is an example of chiasmus, the symmetrical repetition of structure or wording; or how the Fight Club rules thing is an example of epizeuxis.
The audiobook version is pretty fun to listen to, that's how I first encountered the book - a friend who needs something to listen to as they sleep put it on and I enjoyed it.