Preheat your oven to 350°F (175°C). Grab a 9x13-inch baking dish and give it a quick spray with cooking spray so nothing sticks.
Heat olive oil in a skillet over medium heat. Toss in the diced onion and cook for 3-4 minutes until it’s soft and smells amazing.
Stir in the shredded chicken, black beans, chili powder, cumin, and garlic powder. Mix it up for 2 minutes to wake up those spices.
Add half the enchilada sauce, salsa, and green chiles (if using). Stir until everything’s coated and warm, about 2-3 minutes.
Spread a thin layer of the remaining enchilada sauce on the bottom of your baking dish—just enough to cover it like a cozy blanket.
Lay 4 corn tortillas over the sauce, overlapping them a bit if needed. Don’t worry if they tear; it’s all getting smothered anyway!
Spoon half the chicken mixture over the tortillas. Spread it out evenly so every bite’s packed with flavor.
Dollop half the sour cream over the chicken layer, then sprinkle on 1 cup of shredded cheese. Get ready for that melty goodness!
Add another layer of 4 tortillas on top. Pour the rest of the enchilada sauce over them and spread it around.
Add the rest of the chicken mixture, the remaining sour cream, and top it all off with the last cup of cheese.
Pop the dish in the oven and bake for 25-30 minutes, until the cheese is bubbly and golden.
Let it cool for 5-10 minutes before slicing. Garnish with chopped cilantro if you’re feeling fancy, and serve it up hot!