Baked Fried Chicken

2 lbs bone-in, skin-on chicken pieces (such as breasts, thighs, and drumsticks)
1 cup buttermilk
1 tsp hot sauce (optional)
1 cup all-purpose flour
1 tsp paprika
1 tsp garlic powder
1 tsp onion powder
1 tsp salt
1/2 tsp black pepper
Vegetable oil cooking spray
In a large bowl, whisk together the buttermilk and hot sauce (if using). Add the chicken pieces and toss to coat. Cover the bowl and refrigerate for at least 30 minutes or up to 8 hours.
Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper or a silicone baking mat.
In a shallow dish or a large resealable bag, combine the flour, paprika, garlic powder, onion powder, salt, and pepper.
Remove the chicken pieces from the buttermilk mixture, allowing any excess to drip off. Place the chicken in the dish or bag with the flour mixture and toss or shake until the chicken is evenly coated.
Place the coated chicken pieces on the prepared baking sheet and lightly spray them with vegetable oil cooking spray.
Bake the chicken for 35-45 minutes, or until the internal temperature reaches 165°F (74°C).
Let the chicken rest for a few minutes before serving