Preheat your oven to 375°F (190°C). Grease a 9x13-inch baking dish with cooking spray or butter.
In a large skillet, cook the ground beef over medium heat until browned, breaking it apart with a spoon. Drain excess fat.
Add the chopped onion and minced garlic to the beef and sauté for 2-3 minutes, until softened and fragrant.
Stir in the enchilada sauce (or homemade sauce), green chilies (if using), chili powder, cumin, salt, and pepper. Simmer for 5 minutes, allowing the flavors to meld together.
In a separate skillet, lightly fry the tortillas in a small amount of oil or heat them in the microwave to soften.
Spoon a generous amount of the beef mixture onto each tortilla, roll it up tightly, and place it seam-side down in the prepared baking dish.
Once all the tortillas are rolled and arranged in the baking dish, pour the remaining enchilada sauce over the top. Sprinkle the shredded cheese evenly over the sauce.
Bake for 20-25 minutes, or until the cheese is melted and bubbly, and the enchiladas are heated through.
Serve hot with your favorite toppings, such as sour cream, chopped cilantro, and salsa.