Preheat your oven to 400°F (200°C). Line a baking sheet or roasting pan with parchment paper or foil for easy cleanup.
In a small mixing bowl, whisk together the olive oil, minced garlic, chopped rosemary, salt, and black pepper until well combined.
Pat the chicken dry with paper towels to ensure crispy skin. Place the chicken in a large bowl or directly on the prepared baking sheet.
Pour the garlic-rosemary mixture over the chicken. Use your hands to rub the marinade thoroughly over the meat, ensuring it gets under the skin and coats all sides.
Arrange the chicken in a single layer on the baking sheet. If using lemon, tuck slices around the chicken pieces.
Roast in the preheated oven for 35-40 minutes for bone-in thighs, or 25-30 minutes for boneless breasts, until the skin is golden and the internal temperature reaches 165°F (74°C).
Remove from the oven and let the chicken rest for 5-10 minutes before serving to allow the juices to redistribute.