If you're just getting into Dungeons and Dragons and you're looking for what source material is going to be helpful, it can be overwhelming. The needs of a player differ quite a bit from the needs of a DM, and while I would highly recommend playing both roles when possible, if you're not expecting to be running a game of your own for a while it is not necessary to make the same investments. For you as a player the most important thing is variety. The more options you have the more you can mix and match, create a character that is perfect for what you are picturing. These suggestions provide both the base level knowledge necessary to get started, as well as the books that will allow for near bottomless customization.
1. The Player's Handbook
This is a no brainer. It is by far the most necessary source book for both players and DMs. This will tell you everything you need to know in order to play the game, the rules that govern everything from how your character moves to where they come from. It covers your religion options, spells, how to engage in combat and exploration. It also teaches the basics of how to build a character, along with the base level options for race and class. If you're building a character for the first time, these base level options will likely still be overwhelming, so it's a good idea to just start with what's in this book. Additionally, most of the rest of the books in this article simply build off of the races/classes laid out in the Player's Handbook.
2. Tasha's Cauldron of Everything
One of the few sourcebooks that offers as much if not more to players as it does to DMs. Tasha's deals mostly with classes, offering add-ons and options to further enhance and customize existing classes. It also offers the Artificer class, which hails as something of an homage to the Pathfinder ruleset. Artificer is a popular class, great for optimization as well as creating some really cool tools to use in-game. Along with the class changes and Artificer, it provides additional patrons and groups you can join up with, along with a ton of new spells and magic items. It is a welcome addition that does a lot for helping a player out with their class.
3. Volo's Guide to Monsters
This book deals mostly with fleshing out the bestiary that a DM can draw upon when running a game, but before it gets to that, it fleshes out a bunch of additional races that the player can use for their characters. While a race has less effect on a character than class often does, it often has large repercussions on roleplay and if picked properly can service the class you choose wonderfully. Volo's will provide more options for getting that choice right, and lets the player choose some races that, as the name of the book suggests, are normally considered monsters. And playing as a monster can be great fun indeed.
4. Xanathar's Guide to Everything
Similar to Tasha's, this sourcebook deals with classes and providing more options when it comes to building yours out. It does not add any new classes, but does provide more subclass options for each of the classes in the Player's Handbook, along with some sweet spells for some of them. Finally, Xanathar's provides a considerable section that helps with naming your characters, if that's something that you struggle with.
With these four books you'll have a plethora of options to choose from, both in races and classes to play as. The Player's Handbook will teach you how to play and provide everything you need to simply get started. The other three books allow for optimization and mixing for fun and curiosity.