Preheat the oven to 400 degrees F.
Combine chopped onions, carrots, celery, and vegetable oil in a large roasting pan until well coated.
Place turkey wings on top of the coated vegetables.
Roast it in the oven until the turkey wings are browned, and the vegetables are caramelized and softened.
Transfer roasted turkey wings and vegetables to a large stockpot.
Add a small amount of water to the pan to help deglaze the pan for about 10 minutes.
Strain the mixture through a fine mesh strainer and pour the liquid back into the saucepan.
Transfer the mixture to the stockpot and add 10 cups of cold water, thyme, and garlic.
Bring the turkey wing mixture to a boil, uncovered, until the meat falls off the bone for about 3 hours. Skim off the fat and reserve it for making gravy.
Slowly whisk all-purpose flour in a saucepan and cook for 2 to 3 minutes. Pour in reserved turkey and butter, whisking constantly.
Simmer gravy until thick and warmed through, about 5 minutes and season with cayenne, salt, and pepper.