Taxonomy of RPG-related books:
Rulebooks tell you how to play the game.
Optional books of rules add modular components to the base game. They add nuance to specific actions (for example, a book might add rules on owning and managing a castle in a fantasy world, or it might add rules on hacking in a sci fi game; these are things you can do without rules in the game, but if you want added stakes, then these books are ones you would want to obtain).
Adventures (formerly called "modules") provide game plots and locations, in the event that you have no interest in designing your own.
Source books or "settings" provide additional information on the setting of a game, sometimes even providing an alternate game universe with additional rules.
Extra media, like novels, comics, movies, and video games, provide more information (sometimes in canon, sometimes not) about the game universe in which you are playing. Rarely do these have impact on the rules of the game, but they may provide a common language and shared experience for the players.
The only essential purchase is the rulebook. Everything else can be generated by gamers. Purchasing additional material is optional, and can either be seen as a great way to support a company providing your entertainment, or as an insidious plot by greedy corporations to rope you into a perpetual cycle of capitalism. However, RPG is a pretty healthy (and often open) system, so free and open content abounds.