A game of Dungeons and Dragons is more than just dungeon bashing, picking up loot and killing monsters. It doesn’t have to be much more than this, but even a little effort to build a world can make a big difference.
The two biggest things to bear in mind are believability and consistency. Nail these two, and the rest will fall into place.
Believability is important. You are playing in a fantasy world, but that doesn’t mean that everything is different, or that nothing really happens for a reason. Start from the real world, think about what differences magic might make, and make those changes believable. Do Kings need magical advisers? How does Castle design change when magic is common? Street lighting and sanitation in cities, are they magically created? If you can answer these questions, you can put your players in a world that feels real, and that they are more likely to care about.
Consistency is making sure that things are the same when they should be the same. The King won’t change from week to week, if you name him, record it somewhere, so you can use the same name again. If things change, they should change for a reason, even if it’s not immediately obvious to your players, you need to know what that reason is.
If the characters sell their loot at a local town, use a recurring NPC (like the Jeweller) to build consistency and familiarity. This NPC can develop a character over time, and turn a mechanical experience (loot to money) into a roleplay experience. Once a rapport is built with a recurring NPC, the players might care about them. You can use this as a GM to produce new adventure hooks. Kidnapping or killing a favourite NPC can lead the PCs into an adventure, or series of adventures. Alternatively, the NPC can give quests to the PCs, with rewards tied to how well they have worked on creating a friendship with the NPC.
Consistency and believability are the keys to build a world that your players can have fun in, and can take a dungeon bash up to the next level of play.