Preheat the oven to 350°F (175°C).
In a large skillet over medium heat, cook the ground beef, onion, and garlic until the beef is browned and the onion is soft, about 5-7 minutes. Drain any excess fat.
Stir in the chili powder, cumin, salt, and black pepper. Cook for an additional 1-2 minutes.
Remove the skillet from heat and mix in the refried beans until well combined.
Warm the corn tortillas in a dry skillet or microwave until pliable.
Spoon about 1/4 cup of the beef and bean mixture onto each tortilla, sprinkle with a little cheese, and roll them up tightly.
Place the rolled tortillas seam-side down in a greased 9x13-inch baking dish.
Pour the enchilada sauce evenly over the top of the rolled enchiladas, then sprinkle with the remaining cheese.
Cover the dish with aluminum foil and bake for 20 minutes. Remove the foil and bake for an additional 10 minutes, or until the cheese is melted and bubbly.
Garnish with chopped cilantro if desired and serve with sour cream on the side.