Pat the chicken thighs dry with paper towels and season both sides with salt and black pepper.
In a large skillet or Dutch oven, heat the olive oil over medium heat. Add the chicken thighs, skin-side down, and cook for about 5-7 minutes until golden brown. Flip and brown the other side for another 5 minutes. Remove the chicken and set aside.
In the same skillet, add the finely chopped onion and sauté for about 5 minutes until translucent. Then add the minced garlic and cook for about 1 minute until fragrant.
Stir in the sweet paprika, salt, black pepper, and cayenne pepper if using. Cook for about 1 minute, then pour in the chicken broth, scraping up any browned bits from the bottom of the pan.
Return the browned chicken thighs to the skillet, skin-side up. Bring to a gentle simmer, reduce heat to low, cover, and cook for 30-35 minutes until the chicken is tender.
In a small bowl, whisk together the sour cream and flour until smooth. Gradually stir in a few spoonfuls of the hot broth to temper the mixture, then add it back into the skillet. Cook for an additional 5 minutes to thicken the sauce.