Dungeons & Dragons is a lot of fun, but there's (unfair) pressure put on the Dungeon Master to be responsible for the enjoyment of everyone at the table—at least, in most groups.
While DMs do have the most power to ensure everyone's having a good time in a session, the onus should never rest entirely on the DM alone. There's plenty you can do as a player to help out!
Things you can do that not only make the game more fun for other players, but also make the DM's life a lot easier. The DM, after all, has a lot of his own stuff to worry about behind the screen. If you make his life easier, the whole game will go a lot smoother.
As a frequent DM myself, here are a few of my top tips that I like to share with D&D players. If you do these things, you'll be a well-loved player that's welcome at any D&D table!
1. Involve Others in Character Generation
No one should create a character in isolation. If the whole group is aware of what everyone else is going to be—concepts and backstories—then people can adjust their decisions accordingly.
See how you can tie your backstories together and make sure you're not duplicating roles within the party. There's nothing wrong with having two Wizards, for example, but you probably don't want to have the same spells and personalities.
That's a recipe for at least one of the players getting bored and frustrated with the game!
But if you don't want to involve the other players, you should at least involve the DM so they're aware of how you envision your character evolving throughout the campaign.
By involving the DM in your character generation, they will be able to adjust the campaign in ways that will help your character shine at various plot points and challenge you in fun ways.
2. Learn Your Spells, Abilities, and Features
Every class in D&D has its own set of spells, abilities, and features to learn. Some classes do overlap and share bits and pieces, but the point still stands: learn your class mechanics and understand them!
Even a veteran DM will have trouble memorizing every single mechanic, condition, exception, etc. Instead of relying on them for everything, try to become a master of your own mechanics. Take time to learn what you can do, when you can do it, and why you'd want to.
For example, Sleep is a powerful spell in D&D 5e but it has an area effect that can be disastrous in combat if it catches other players in the radius. It's one of several area spells that affect ALL creatures rather than just enemies or allies. You need to know this before casting it.
Be sure to read all text carefully to make sure you're using abilities and features the right way at the right time. It'll make you more popular with other players as well as the DM, who'll be glad they don't have to babysit you on every turn of combat.
3. Take Notes and Get Involved
The most wonderful sight a DM can see is a player who's actively taking notes on the story, the characters, and the world. They love when players get into the campaign at hand.
Whether it's writing down major plot points, keeping track of various NPCs (especially recurring ones), or jotting down ideas of how you want to interact with the world, DMs will love you—because it shows that you're taking an active interest in the game.
And if the plot is a little more complex and involves conspiracies or rival factions, DMs love when a player is paying attention and able to connect the dots and tie threads together for the party.
As an added bonus, your notes will help keep the party on track and on the same page, which is particularly useful for players who might've missed a session and need to catch up on what they missed.
But overall, the simple fact is that no DM has a perfect memory. It's easy to forget details or mix up NPCs, and they likely have a mountain of their own notes to deal with. DMs love when someone else can take some of that pressure off of them.
4. Don't Hog the Spotlight
One of the most important lessons every D&D player needs to learn is that Dungeons & Dragons is a collaborative narrative. There isn't a single "main character" in the story—you're ALL main characters.
Which means every character deserves to have their own moments in the spotlight, and you aren't supposed to be the star of every scene. Hogging the spotlight is the fastest way to become an undesirable player that no one wants in their D&D group.
Other players need a chance to shine and let their backstories come to light. Nothing is worse than a player who insists on being the center of attention all the time. Sometimes it's OK—no, it's encouraged—to just sit back and enjoy while others take the stage.
5. Don't Avoid the Spotlight
It's one thing to not be the center of attention all the time. It's another thing to swing to the opposite extreme, so much so that you fade into the background and never participate beyond combat.
It's OK to take center stage every once in a while, especially when your party encounters an NPC or challenge that suits your character. And if your DM sets up a scene that ties into your backstory or progression, be excited and embrace the moment.
After all, your DM has likely put a lot of work into making that moment happen for you. Don't make him regret all that effort. DMs love when their special moments are appreciated by players.
Not only will your DM enjoy the emotional payoff from their own hard work, but other players will enjoy seeing your character develop and change—and that's great for everyone at the table.
Always Have Fun in D&D
The most important rule at any D&D table is one that should never be underestimated: everyone is responsible for their own fun.
Your DM has more than enough going on between balancing encounters and keeping the story moving forward, so it isn't fair for you to put all the work on their shoulders.
Make sure you're actively making the table a fun place to be. Be active, be involved, be generous, be courteous, and be personable. If you can do that, the fun and good times will naturally follow.