Many libraries use Library of Congress Subject Headings (LCSH), which are maintained by the Library of Congress, in bibliographic records to help organize items that are similar in subject. It creates a shared vocabulary among libraries, helping users discover more sources related to a particular topic.
Keep in mind, though, that this shared vocabulary is approved by Congress and is a product of society, based within a historically white profession and culture. Librarians are also involved in social justice work and seek to disband antiquated and offensive terms, though not always approved by Congress. For example, efforts to change the subject heading illegal alien to noncitizen and unauthorized immigration were not approved by Congress. (See the 2016 Library Journal article "Library of Congress Drops Illegal Alien Subject Heading, Provokes Backlash Legislation.")
Interesting books about cataloging:
There are a lot of headings, but you don't have to know specific headings to make use of them. If you find a book or article in the library catalog (or another database) that seems like it's a good fit for your research, take a look at the item's subject headings, and click on them to find other items that may be similar. Names of authors are also subject terms, so you can also find other items written by them or about them.
I ran a search for food AND México AND history in UC Library Search, the library catalog, and I found a book titled Feeding Mexico: The political uses of food since 1910
It includes these subject terms:
There is not one perfect search, so you will need to use a combination of different strategies to discover information. Searching is an exploration.