Preheat the oven to 325°F (165°C).
Prepare the turkey by removing the giblets and neck from the cavity.
Pat the turkey dry with paper towels.
Rub the olive oil or melted butter over the entire surface of the turkey.
Season the turkey generously with kosher salt, black pepper, garlic powder, and thyme.
Stuff the cavity with onion and rosemary sprigs.
Place the turkey breast-side up on a rack in a roasting pan.
Pour 2 cups of chicken broth into the bottom of the roasting pan.
Roast the turkey for about 2 to 3 hours, basting every 30 minutes with the pan juices.
Check the turkey's internal temperature using a meat thermometer.
Let the turkey rest for at least 20-30 minutes before carving.